diff --git a/src/Toolkit/CHANGELOG.md b/src/Toolkit/CHANGELOG.md index be90f3cb82d..aa06a7ead40 100644 --- a/src/Toolkit/CHANGELOG.md +++ b/src/Toolkit/CHANGELOG.md @@ -2,6 +2,7 @@ ## 2.35 +- [Flowbite] Add Flowbite v4 kit - [Shadcn] Add `toggle` recipe - [Shadcn] Use `html_attr_type` filter from `twig/html-extra:^3.24` for composable trigger attributes - [Shadcn] Rename `trigger_attrs` to `alert_dialog_trigger_attrs` in `AlertDialog:Trigger` diff --git a/src/Toolkit/kits/flowbite-4/INSTALL.md b/src/Toolkit/kits/flowbite-4/INSTALL.md new file mode 100644 index 00000000000..803c7402b11 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/INSTALL.md @@ -0,0 +1,277 @@ +# Getting started + +This kit provides ready-to-use and fully-customizable UI Twig components based on [Flowbite](https://flowbite.com/) components's **design**. + +Please note that not every Flowbite component is available in this kit, but we are working on it! + +## Requirements + +This kit requires TailwindCSS and Flowbite v4 to work: + +### TailwindCSS + +- If you use Symfony AssetMapper, you can install TailwindCSS with the [TailwindBundle](https://symfony.com/bundles/TailwindBundle/current/index.html), +- If you use Webpack Encore, you can follow the [TailwindCSS installation guide for Symfony](https://tailwindcss.com/docs/installation/framework-guides/symfony) + +## Installation + +1. Install Flowbite, either with `importmap:require` for AssetMapper, or `npm` for Webpack Encore: + +``` +# With AssetMapper +php bin/console importmap:require flowbite + +# With npm +npm install flowbite +``` + +2. Modify the file `assets/styles/app.css` with the following content: + +```css +@import 'tailwindcss'; + +/* With AssetMapper... */ +@source "../vendor/flowbite"; +/* ... or with Webpack Encore */ +/* @source "../../node_modules/flowbite"; */ + +@custom-variant dark (&:is(.dark *)); + +/* You can customize theming here see https://flowbite.com/docs/customize/theming/ */ +@theme { + --font-sans: + 'Inter', 'ui-sans-serif', 'system-ui', '-apple-system', 'system-ui', 'Segoe UI', 'Roboto', 'Helvetica Neue', + 'Arial', 'Noto Sans', 'sans-serif', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-body: + 'Inter', 'ui-sans-serif', 'system-ui', '-apple-system', 'system-ui', 'Segoe UI', 'Roboto', 'Helvetica Neue', + 'Arial', 'Noto Sans', 'sans-serif', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-mono: + 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace'; + + /* TEXT VARIABLES */ + --text-2xs: 0.625rem; + --spacing-8xl: 90rem; + --leading-9: 36px; /* rem pls */ + --leading-7: 28px; + --leading-8: 32px; + --leading-6: 24px; + --leading-4: 16px; + --leading-none: 1px; + --leading-5: 20px; + --tracking-tighter: -0.8px; + --leading-heading-none: 60px; + --tracking-tight: -0.4px; + + /* BORDER RADIUS VARIABLES */ + --radius-0: 0px; + --radius-xxs: 2px; + --radius-xs: 4px; + --radius-sm: 6px; + --radius: 8px; + --radius-base: 12px; + --radius-lg: 16px; + + /* BORDER WIDTH VARIABLES */ + --default-border-width: 1px; + + /* TEXT COLORS VARIABLES */ + /* main text color */ + --color-body: var(--color-gray-600); + --color-body-subtle: var(--color-gray-500); + + /* text heading colors */ + --color-heading: var(--color-gray-900); + + /* used for custom brand colors */ + --color-fg-brand-subtle: var(--color-blue-200); + --color-fg-brand: var(--color-blue-700); + --color-fg-brand-strong: var(--color-blue-900); + + /* used for status colors */ + --color-fg-success: var(--color-emerald-700); + --color-fg-success-strong: var(--color-emerald-900); + --color-fg-danger: var(--color-rose-700); + --color-fg-danger-strong: var(--color-rose-900); + --color-fg-warning-subtle: var(--color-orange-600); + --color-fg-warning: var(--color-orange-900); + --color-fg-yellow: var(--color-yellow-400); + --color-fg-disabled: var(--color-gray-400); + --color-fg-purple: var(--color-purple-600); + --color-fg-cyan: var(--color-cyan-600); + --color-fg-indigo: var(--color-indigo-600); + --color-fg-pink: var(--color-pink-600); + --color-fg-lime: var(--color-lime-600); + + /* BACKGROUND COLOR VARIABLES */ + /* used for neutral colors */ + --color-neutral-primary-soft: var(--color-white); + --color-neutral-primary: var(--color-white); + --color-neutral-primary-medium: var(--color-white); + --color-neutral-primary-strong: var(--color-white); + --color-neutral-secondary-soft: var(--color-gray-50); + --color-neutral-secondary: var(--color-gray-50); + --color-neutral-secondary-medium: var(--color-gray-50); + --color-neutral-secondary-strong: var(--color-gray-50); + --color-neutral-secondary-strongest: var(--color-gray-50); + --color-neutral-tertiary-soft: var(--color-gray-100); + --color-neutral-tertiary: var(--color-gray-100); + --color-neutral-tertiary-medium: var(--color-gray-100); + --color-neutral-quaternary: var(--color-gray-200); + --color-neutral-quaternary-medium: var(--color-gray-200); + --color-gray: var(--color-gray-300); + + /* used for brand colors */ + --color-brand-softer: var(--color-blue-50); + --color-brand-soft: var(--color-blue-100); + --color-brand: var(--color-blue-700); + --color-brand-medium: var(--color-blue-200); + --color-brand-strong: var(--color-blue-800); + + /* used for status colors */ + --color-success-soft: var(--color-emerald-50); + --color-success: var(--color-emerald-700); + --color-success-medium: var(--color-emerald-100); + --color-success-strong: var(--color-emerald-800); + --color-danger-soft: var(--color-rose-50); + --color-danger: var(--color-rose-700); + --color-danger-medium: var(--color-rose-100); + --color-danger-strong: var(--color-rose-800); + --color-warning-soft: var(--color-orange-50); + --color-warning: var(--color-orange-500); + --color-warning-medium: var(--color-orange-100); + --color-warning-strong: var(--color-orange-700); + --color-dark-soft: var(--color-gray-800); + --color-dark: var(--color-gray-800); + --color-dark-strong: var(--color-gray-900); + --color-disabled: var(--color-gray-100); + --color-purple: var(--color-purple-500); + --color-sky: var(--color-sky-500); + --color-teal: var(--color-teal-600); + --color-pink: var(--color-pink-600); + --color-cyan: var(--color-cyan-500); + --color-fuchsia: var(--color-fuchsia-600); + --color-indigo: var(--color-indigo-600); + --color-orange: var(--color-orange-400); + + /* BORDER COLOR VARIABLES */ + --color-buffer: var(--color-white); + --color-buffer-medium: var(--color-white); + --color-buffer-strong: var(--color-white); + --color-muted: var(--color-gray-50); + --color-light-subtle: var(--color-gray-100); + --color-light: var(--color-gray-100); + --color-light-medium: var(--color-gray-100); + --color-default-subtle: var(--color-gray-200); + --color-default: var(--color-gray-200); + --color-default-medium: var(--color-gray-200); + --color-default-strong: var(--color-gray-200); + + /* used for status colors */ + --color-success-subtle: var(--color-emerald-200); + --color-danger-subtle: var(--color-rose-200); + --color-warning-subtle: var(--color-orange-200); + --color-brand-subtle: var(--color-blue-200); + --color-brand-light: var(--color-blue-600); + --color-dark-subtle: var(--color-gray-800); + --color-dark-backdrop: var(--color-gray-950); + + /* shiki variables */ + --color-shiki-fg-brand: #79b8ff; + --color-shiki-fg-brand-subtle: #9ecbff; +} + +.dark { + /* text color variables */ + --color-body: var(--color-gray-400); + --color-body-subtle: var(--color-gray-400); + --color-heading: var(--color-white); + --color-fg-brand-subtle: var(--color-blue-200); + --color-fg-brand: var(--color-blue-500); + --color-fg-brand-strong: var(--color-blue-400); + --color-fg-success: var(--color-emerald-600); + --color-fg-success-strong: var(--color-emerald-300); + --color-fg-danger: var(--color-rose-500); + --color-fg-danger-strong: var(--color-rose-300); + --color-fg-warning-subtle: var(--color-orange-500); + --color-fg-warning: var(--color-orange-300); + --color-fg-yellow: var(--color-yellow-400); + --color-fg-disabled: var(--color-gray-600); + --color-fg-purple: var(--color-purple-500); + --color-fg-cyan: var(--color-cyan-500); + --color-fg-indigo: var(--color-indigo-500); + --color-fg-pink: var(--color-pink-500); + --color-fg-lime: var(--color-lime-500); + + /* background color variables */ + --color-neutral-primary-soft: var(--color-gray-900); + --color-neutral-primary: var(--color-gray-950); + --color-neutral-primary-medium: var(--color-gray-800); + --color-neutral-primary-strong: var(--color-gray-700); + --color-neutral-secondary-soft: var(--color-gray-900); + --color-neutral-secondary: var(--color-gray-950); + --color-neutral-secondary-medium: var(--color-gray-800); + --color-neutral-secondary-strong: var(--color-gray-700); + --color-neutral-secondary-strongest: var(--color-gray-600); + --color-neutral-tertiary-soft: var(--color-gray-900); + --color-neutral-tertiary: var(--color-gray-800); + --color-neutral-tertiary-medium: var(--color-gray-700); + --color-neutral-quaternary: var(--color-gray-700); + --color-neutral-quaternary-medium: var(--color-gray-600); + --color-gray: var(--color-gray-600); + --color-brand-softer: var(--color-blue-950); + --color-brand-soft: var(--color-blue-900); + --color-brand: var(--color-blue-600); + --color-brand-medium: var(--color-blue-900); + --color-brand-strong: var(--color-blue-700); + --color-success-soft: var(--color-emerald-950); + --color-success: var(--color-emerald-600); + --color-success-medium: var(--color-emerald-900); + --color-success-strong: var(--color-emerald-700); + --color-danger-soft: var(--color-rose-950); + --color-danger: var(--color-rose-700); + --color-danger-medium: var(--color-rose-900); + --color-danger-strong: var(--color-rose-800); + --color-warning-soft: var(--color-orange-950); + --color-warning: var(--color-orange-600); + --color-warning-medium: var(--color-orange-900); + --color-warning-strong: var(--color-orange-700); + --color-dark-soft: var(--color-gray-700); + --color-dark: var(--color-gray-800); + --color-dark-strong: var(--color-gray-700); + --color-disabled: var(--color-gray-800); + --color-purple: var(--color-purple-500); + --color-sky: var(--color-sky-500); + --color-teal: var(--color-teal-500); + --color-pink: var(--color-pink-500); + --color-cyan: var(--color-cyan-500); + --color-fuchsia: var(--color-fuchsia-500); + --color-indigo: var(--color-indigo-500); + --color-orange: var(--color-orange-400); + + /* border color variables */ + --color-buffer: var(--color-gray-950); + --color-buffer-medium: var(--color-gray-900); + --color-buffer-strong: var(--color-gray-800); + --color-muted: var(--color-gray-900); + --color-light-subtle: var(--color-gray-900); + --color-light: var(--color-gray-800); + --color-light-medium: var(--color-gray-700); + --color-default-subtle: var(--color-gray-900); + --color-default: var(--color-gray-800); + --color-default-medium: var(--color-gray-700); + --color-default-strong: var(--color-gray-600); + --color-success-subtle: var(--color-emerald-900); + --color-danger-subtle: var(--color-rose-900); + --color-warning-subtle: var(--color-orange-900); + --color-brand-subtle: var(--color-blue-900); + --color-brand-light: var(--color-blue-600); + --color-dark-subtle: var(--color-gray-700); + --color-dark-backdrop: var(--color-gray-950); +} +``` + +3. Modify your `assets/app.js` file by adding: + +```js +import 'flowbite'; +``` diff --git a/src/Toolkit/kits/flowbite-4/alert/assets/controllers/alert_controller.js b/src/Toolkit/kits/flowbite-4/alert/assets/controllers/alert_controller.js new file mode 100644 index 00000000000..9d8f5e6fb05 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/assets/controllers/alert_controller.js @@ -0,0 +1,15 @@ +import { Controller } from '@hotwired/stimulus'; +import { Dismiss } from 'flowbite'; + +export default class extends Controller { + alert = null; + static targets = ['alert']; + + connect() { + this.alert = new Dismiss(this.alertTarget); + } + + close() { + this.alert.hide(); + } +} diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Accent.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Accent.html.twig new file mode 100644 index 00000000000..0560616a6e9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Accent.html.twig @@ -0,0 +1,46 @@ +
+ + + + +

Info alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Danger alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Success alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Warning alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Dark alert! Change a few things up and try submitting again.

+
+
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Action.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Action.html.twig new file mode 100644 index 00000000000..1630b32c6b5 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Action.html.twig @@ -0,0 +1,15 @@ + + + + This is an info alert + + More info about this info alert goes here. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content. + + + + + + diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Border.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Border.html.twig new file mode 100644 index 00000000000..fcd3dcaa6b9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Border.html.twig @@ -0,0 +1,46 @@ +
+ + + + +

Info alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Danger alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Success alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Warning alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Dark alert! Change a few things up and try submitting again.

+
+
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Demo.html.twig new file mode 100644 index 00000000000..d8073bd6430 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Demo.html.twig @@ -0,0 +1,31 @@ +
+ + +

Info alert! Change a few things up and try submitting again.

+
+
+ + + +

Danger alert! Change a few things up and try submitting again.

+
+
+ + + +

Success alert! Change a few things up and try submitting again.

+
+
+ + + +

Warning alert! Change a few things up and try submitting again.

+
+
+ + + +

Dark alert! Change a few things up and try submitting again.

+
+
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Dismissing.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Dismissing.html.twig new file mode 100644 index 00000000000..681baf88e31 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Dismissing.html.twig @@ -0,0 +1,46 @@ +
+ + + + +

A simple info alert with an example link. Give it a click if you like.

+
+
+ + + + + +

A simple danger alert with an example link. Give it a click if you like.

+
+
+ + + + + +

A simple success alert with an example link. Give it a click if you like.

+
+
+ + + + + +

A simple warning alert with an example link. Give it a click if you like.

+
+
+ + + + + +

A simple dark alert with an example link. Give it a click if you like.

+
+
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/Usage.html.twig new file mode 100644 index 00000000000..05993851df9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/Usage.html.twig @@ -0,0 +1,15 @@ + + + + Info alert! + + You can add components to your app using the cli. + + + Enable + + diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/With Icon.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/With Icon.html.twig new file mode 100644 index 00000000000..bc23a0a050e --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/With Icon.html.twig @@ -0,0 +1,46 @@ +
+ + + + +

Info alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Danger alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Success alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Warning alert! Change a few things up and try submitting again.

+
+
+ + + + + +

Dark alert! Change a few things up and try submitting again.

+
+
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/examples/With List.html.twig b/src/Toolkit/kits/flowbite-4/alert/examples/With List.html.twig new file mode 100644 index 00000000000..863794c38f2 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/examples/With List.html.twig @@ -0,0 +1,52 @@ +
+ + + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ + See recommendation here + +
+ + + + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ + See recommendation here + +
+ + + + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ + See recommendation here + +
+
diff --git a/src/Toolkit/kits/flowbite-4/alert/manifest.json b/src/Toolkit/kits/flowbite-4/alert/manifest.json new file mode 100644 index 00000000000..19618eff6f3 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Alert", + "description": "The alert component can be used to provide information to your users such as success or error messages, but also highlighted information complementing the normal flow of paragraphs and headers on a page.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["twig/extra-bundle", "twig/html-extra:^3.12.0", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert.html.twig b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert.html.twig new file mode 100644 index 00000000000..ffc3666f262 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert.html.twig @@ -0,0 +1,44 @@ +{# @prop variant 'brand'|'danger'|'success'|'warning'|'dark' The visual style variant. Defaults to `brand` #} +{# @prop border 'none'|'bordered'|'accent' The visual border style. Defaults to `none` #} +{# @prop dismissible boolean Whether the alert can be dismissible. Defaults to `false` #} +{# @block content The alert content, typically includes `Alert:Title` and `Alert:Description` #} +{# @block icon The alert icon, typically includes `twig:ux:icon` #} +{%- props variant = 'brand', border = 'none', dismissible = false -%} +{%- set style = html_cva( + base: "flex gap-2 text-sm p-4 rounded-base border-transparent *:[svg:not([class*='size-'])]:size-4 [&_a]:hover:no-underline [&_a]:underline group/alert", + variants: { + border: { + none: '', + bordered: 'border', + accent: 'border-t-4', + }, + variant: { + brand: 'text-fg-brand-strong bg-brand-softer border-brand-subtle', + danger: 'text-fg-danger-strong bg-danger-soft border-danger-subtle', + success: 'text-fg-success-strong bg-success-soft border-success-subtle', + warning: 'text-fg-warning bg-warning-soft border-warning-subtle', + dark: 'text-heading bg-neutral-secondary-medium border-default-medium', + }, + }, +) -%} + + diff --git a/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Action.html.twig b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Action.html.twig new file mode 100644 index 00000000000..9f6fe51bc6f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Action.html.twig @@ -0,0 +1,7 @@ +{# @block content The action element, typically a button or link #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Description.html.twig b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Description.html.twig new file mode 100644 index 00000000000..13c57208e0f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Description.html.twig @@ -0,0 +1,7 @@ +{# @block content The descriptive text of the alert #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Title.html.twig b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Title.html.twig new file mode 100644 index 00000000000..7e9b6ced030 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/alert/templates/components/Alert/Title.html.twig @@ -0,0 +1,7 @@ +{# @block content The title text of the alert #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/As link.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/As link.html.twig new file mode 100644 index 00000000000..09cf184ee06 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/As link.html.twig @@ -0,0 +1,8 @@ +
+ Brand + Alternative + Gray + Danger + Success + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Bordered.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Bordered.html.twig new file mode 100644 index 00000000000..657b3864f0f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Bordered.html.twig @@ -0,0 +1,8 @@ +
+ Brand + Alternative + Gray + Danger + Success + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Demo.html.twig new file mode 100644 index 00000000000..590201f97bb --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Demo.html.twig @@ -0,0 +1,8 @@ +
+ Brand + Alternative + Gray + Danger + Success + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Icon.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Icon.html.twig new file mode 100644 index 00000000000..da5f9a879b3 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Icon.html.twig @@ -0,0 +1,8 @@ +
+ + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Large.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Large.html.twig new file mode 100644 index 00000000000..1822797ad23 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Large.html.twig @@ -0,0 +1,8 @@ +
+ Brand + Alternative + Gray + Danger + Success + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Pill.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Pill.html.twig new file mode 100644 index 00000000000..5472965bbcd --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Pill.html.twig @@ -0,0 +1,8 @@ +
+ Brand + Alternative + Gray + Danger + Success + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/badge/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/badge/examples/Usage.html.twig new file mode 100644 index 00000000000..09c568b62e7 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/examples/Usage.html.twig @@ -0,0 +1,8 @@ + + Badge + diff --git a/src/Toolkit/kits/flowbite-4/badge/manifest.json b/src/Toolkit/kits/flowbite-4/badge/manifest.json new file mode 100644 index 00000000000..c8b186f0618 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Badge", + "description": "The badge component can be used to complement other elements such as buttons or text elements as a label or to show the count of a given data, such as the number of comments for an article or how much time has passed by since a comment has been made.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["twig/extra-bundle", "twig/html-extra:^3.12.0", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/badge/templates/components/Badge.html.twig b/src/Toolkit/kits/flowbite-4/badge/templates/components/Badge.html.twig new file mode 100644 index 00000000000..b68d4045159 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/badge/templates/components/Badge.html.twig @@ -0,0 +1,39 @@ +{# @prop variant 'brand'|'alternative'|'gray'|'danger'|'success'|'warning' The visual style variant. Defaults to `brand` #} +{# @prop size 'default'|'lg' The badge size. Defaults to `default` #} +{# @prop shape 'rounded'|'pill' The badge shape. Defaults to `rounded` #} +{# @prop border 'none'|'bordered' The badge border. Defaults to `none` #} +{# @prop as 'div' The HTML tag to render. Defaults to `div` #} +{# @block content The badge label or content #} +{%- props variant = 'brand', size = 'default', shape = 'rounded', border = 'none', as = 'div' -%} +{%- set style = html_cva( + base: 'inline-flex items-center justify-center font-medium', + variants: { + variant: { + brand: 'bg-brand-softer text-fg-brand-strong border-brand-subtle [a&]:hover:bg-brand-soft', + alternative: 'bg-neutral-primary-soft text-heading border-default [a&]:hover:bg-neutral-secondary-medium', + gray: 'bg-neutral-secondary-medium text-heading border-default-medium [a&]:hover:bg-neutral-tertiary-medium', + danger: 'bg-danger-soft text-fg-danger-strong border-danger-subtle [a&]:hover:bg-danger-medium', + success: 'bg-success-soft text-fg-success-strong border-success-subtle [a&]:hover:bg-success-medium', + warning: 'bg-warning-soft text-fg-warning border-warning-subtle [a&]:hover:bg-warning-medium', + }, + size: { + default: 'px-1.5 py-0.5 text-xs', + lg: 'px-2 py-1 text-sm', + }, + shape: { + rounded: 'rounded', + pill: 'rounded-full', + }, + border: { + none: '', + bordered: 'border', + }, + }, + +) -%} +<{{ as }} + class="{{ style.apply({variant: variant, size: size, shape: shape, border: border}, attributes.render('class'))|tailwind_merge }}" + {{ attributes }} +> + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/button-group/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/button-group/examples/Demo.html.twig new file mode 100644 index 00000000000..a1bfd4a57f8 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/examples/Demo.html.twig @@ -0,0 +1,5 @@ + + Profile + Settings + Messages + diff --git a/src/Toolkit/kits/flowbite-4/button-group/examples/Orientation.html.twig b/src/Toolkit/kits/flowbite-4/button-group/examples/Orientation.html.twig new file mode 100644 index 00000000000..ebe69154962 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/examples/Orientation.html.twig @@ -0,0 +1,5 @@ + + Profile + Settings + Messages + diff --git a/src/Toolkit/kits/flowbite-4/button-group/examples/Size.html.twig b/src/Toolkit/kits/flowbite-4/button-group/examples/Size.html.twig new file mode 100644 index 00000000000..f1e69bfd65e --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/examples/Size.html.twig @@ -0,0 +1,17 @@ +
+ + Small + Button + Group + + + Default + Button + Group + + + Large + Button + Group + +
diff --git a/src/Toolkit/kits/flowbite-4/button-group/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/button-group/examples/Usage.html.twig new file mode 100644 index 00000000000..c1168ac38a5 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/examples/Usage.html.twig @@ -0,0 +1,4 @@ + + One + Two + diff --git a/src/Toolkit/kits/flowbite-4/button-group/manifest.json b/src/Toolkit/kits/flowbite-4/button-group/manifest.json new file mode 100644 index 00000000000..3b3646f278f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Button Group", + "description": "The button group component from Flowbite can be used to stack together multiple buttons and links inside a single element.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["twig/extra-bundle", "twig/html-extra:^3.12.0", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/button-group/templates/components/ButtonGroup.html.twig b/src/Toolkit/kits/flowbite-4/button-group/templates/components/ButtonGroup.html.twig new file mode 100644 index 00000000000..b7f4c4606cb --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button-group/templates/components/ButtonGroup.html.twig @@ -0,0 +1,21 @@ +{# @prop orientation 'horizontal'|'vertical' The layout direction of the button group. Defaults to `horizontal` #} +{# @block content The grouped buttons and/or separators #} +{%- props orientation = 'horizontal' -%} +{%- set style = html_cva( + base: 'inline-flex rounded-base shadow-xs -space-x-px [&>*]:rounded-none', + variants: { + orientation: { + horizontal: '[&>*:first-child]:rounded-s-base [&>*:last-child]:rounded-e-base', + vertical: 'flex-col [&>*:first-child]:rounded-t-base [&>*:last-child]:rounded-b-base', + }, + }, +) -%} + +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Demo.html.twig new file mode 100644 index 00000000000..d830883c85a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Demo.html.twig @@ -0,0 +1,10 @@ +
+ Default + Secondary + Tertiary + Success + Danger + Warning + Dark + Ghost +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Icon.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Icon.html.twig new file mode 100644 index 00000000000..b428c6d9b5d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Icon.html.twig @@ -0,0 +1,31 @@ +
+ + + + + + + + + + + + + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Loader.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Loader.html.twig new file mode 100644 index 00000000000..a4ca1c46ae7 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Loader.html.twig @@ -0,0 +1,6 @@ +
+ + + Loading... + +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Outline.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Outline.html.twig new file mode 100644 index 00000000000..e74333cdffd --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Outline.html.twig @@ -0,0 +1,7 @@ +
+ Outline + Brand + Success + Danger + Warning +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Pill.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Pill.html.twig new file mode 100644 index 00000000000..201f746e650 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Pill.html.twig @@ -0,0 +1,10 @@ +
+ Default + Secondary + Tertiary + Success + Danger + Warning + Dark + Ghost +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Size.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Size.html.twig new file mode 100644 index 00000000000..3d152c7a344 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Size.html.twig @@ -0,0 +1,7 @@ +
+ Extra small + Small + Base + Large + Extra large +
diff --git a/src/Toolkit/kits/flowbite-4/button/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/Usage.html.twig new file mode 100644 index 00000000000..6d48bd418a0 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/Usage.html.twig @@ -0,0 +1,7 @@ + + Button + diff --git a/src/Toolkit/kits/flowbite-4/button/examples/With icon.html.twig b/src/Toolkit/kits/flowbite-4/button/examples/With icon.html.twig new file mode 100644 index 00000000000..461dd8c7c22 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/examples/With icon.html.twig @@ -0,0 +1,11 @@ +
+ + + + + Choose plan + +
diff --git a/src/Toolkit/kits/flowbite-4/button/manifest.json b/src/Toolkit/kits/flowbite-4/button/manifest.json new file mode 100644 index 00000000000..ffdb2de18fe --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Button", + "description": "Use the button component inside forms, as links, social login, payment options with support for multiple styles, colors, sizes, gradients, and shadows", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["twig/extra-bundle", "twig/html-extra:^3.12.0", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/button/templates/components/Button.html.twig b/src/Toolkit/kits/flowbite-4/button/templates/components/Button.html.twig new file mode 100644 index 00000000000..7a40789e1f2 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/button/templates/components/Button.html.twig @@ -0,0 +1,46 @@ +{# @prop variant 'brand'|'secondary'|'tertiary'|'success'|'danger'|'warning'|'dark'|'ghost'|'outline'|'outline-brand'|'outline-success'|'outline-danger'|'outline-warning' The visual style variant. Defaults to `brand` #} +{# @prop size 'default'|'xs'|'sm'|'lg'|'xl'|'icon'|'icon-xs'|'icon-sm' The button size. Defaults to `default` #} +{# @prop shape 'rounded'|'pill' The badge shape. Defaults to `rounded` #} +{# @prop as 'button' The HTML tag to render. Defaults to `button` #} +{# @block content The button label and/or icon #} +{%- props variant = 'brand', size = 'default', shape = 'rounded', as = 'button' -%} +{%- set style = html_cva( + base: 'inline-flex items-center justify-center box-border border border-transparent font-medium focus:ring-4 focus:outline-none shadow-xs', + variants: { + variant: { + brand: 'text-white bg-brand hover:bg-brand-strong focus:ring-brand-medium', + secondary: 'text-body bg-neutral-secondary-medium border-default-medium hover:bg-neutral-tertiary-medium hover:text-heading focus:ring-neutral-tertiary', + tertiary: 'text-body bg-neutral-primary-soft border-default hover:bg-neutral-secondary-medium hover:text-heading focus:ring-neutral-tertiary-soft', + success: 'text-white bg-success hover:bg-success-strong focus:ring-success-medium', + danger: 'text-white bg-danger hover:bg-danger-strong focus:ring-danger-medium', + warning: 'text-white bg-warning hover:bg-warning-strong focus:ring-warning-medium', + dark: 'text-white bg-dark hover:bg-dark-strong focus:ring-neutral-tertiary', + ghost: 'text-heading bg-transparent hover:bg-neutral-secondary-medium focus:ring-neutral-tertiary shadow-none', + outline: 'text-body bg-neutral-primary border-default hover:bg-neutral-secondary-soft hover:text-heading focus:ring-neutral-tertiary', + 'outline-brand': 'text-fg-brand bg-neutral-primary border-brand hover:bg-brand hover:text-white focus:ring-brand-subtle', + 'outline-success': 'text-success bg-neutral-primary border-success hover:bg-success hover:text-white focus:ring-neutral-tertiary', + 'outline-danger': 'text-danger bg-neutral-primary border-danger hover:bg-danger hover:text-white focus:ring-neutral-tertiary', + 'outline-warning': 'text-warning bg-neutral-primary border-warning hover:bg-warning hover:text-white focus:ring-neutral-tertiary', + }, + size: { + default: 'leading-5 text-sm px-4 py-2.5', + xs: 'leading-5 text-xs px-3 py-1.5', + sm: 'leading-5 text-sm px-3 py-2', + lg: 'text-base px-5 py-3', + xl: 'text-base px-6 py-3.5', + icon: 'w-10 h-10', + 'icon-xs': 'w-8 h-8', + 'icon-sm': 'w-9 h-9', + }, + shape: { + rounded: 'rounded-base', + pill: 'rounded-full', + }, + }, +) -%} +<{{ as }} + class="{{ style.apply({variant: variant, size: size, shape: shape}, attributes.render('class'))|tailwind_merge }}" + {{ attributes }} +> + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/card/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/card/examples/Demo.html.twig new file mode 100644 index 00000000000..533becb5d82 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/examples/Demo.html.twig @@ -0,0 +1,9 @@ + + + Noteworthy technology acquisitions 2021 + + + +

Here are the biggest technology acquisitions of 2025 so far, in reverse chronological order.

+
+
diff --git a/src/Toolkit/kits/flowbite-4/card/examples/Form.html.twig b/src/Toolkit/kits/flowbite-4/card/examples/Form.html.twig new file mode 100644 index 00000000000..80d67cbf83d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/examples/Form.html.twig @@ -0,0 +1,33 @@ + + + Sign in to our platform + + + +
+ Your email + +
+ +
+ Your password + +
+ +
+
+ + Remember me +
+ Lost Password? +
+
+ + + + Login to your account + + +
Not registered? Create account
+
+
diff --git a/src/Toolkit/kits/flowbite-4/card/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/card/examples/Usage.html.twig new file mode 100644 index 00000000000..bc3736d29bc --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/examples/Usage.html.twig @@ -0,0 +1,11 @@ + + + Card Title + + +

Card Content

+
+ +

Card Footer

+
+
diff --git a/src/Toolkit/kits/flowbite-4/card/examples/With Button.html.twig b/src/Toolkit/kits/flowbite-4/card/examples/With Button.html.twig new file mode 100644 index 00000000000..de21ed7c722 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/examples/With Button.html.twig @@ -0,0 +1,16 @@ + + + Noteworthy technology acquisitions 2021 + + + +

Here are the biggest technology acquisitions of 2025 so far, in reverse chronological order.

+
+ + + + Read more + + +
diff --git a/src/Toolkit/kits/flowbite-4/card/examples/With image.html.twig b/src/Toolkit/kits/flowbite-4/card/examples/With image.html.twig new file mode 100644 index 00000000000..66b5388a8b5 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/examples/With image.html.twig @@ -0,0 +1,28 @@ + + + + Bukchon Hanok Village by Y K + + + + + + + + Streamlining your design process today. + +

In today’s fast-paced digital landscape, fostering seamless collaboration among Developers and IT Operations.

+
+ + + + Read more + + +
diff --git a/src/Toolkit/kits/flowbite-4/card/manifest.json b/src/Toolkit/kits/flowbite-4/card/manifest.json new file mode 100644 index 00000000000..3e02e76ad64 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Card", + "description": "Use these responsive card components to show data entries and information to your users in multiple forms and contexts such as for your blog, application, user profiles, and more.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/card/templates/components/Card.html.twig b/src/Toolkit/kits/flowbite-4/card/templates/components/Card.html.twig new file mode 100644 index 00000000000..e609763ccfd --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/templates/components/Card.html.twig @@ -0,0 +1,7 @@ +{# @block content The card content, typically includes `Card:Content` with `Card:Header`, and/or `Card:Footer` #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Content.html.twig b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Content.html.twig new file mode 100644 index 00000000000..c67b25219a9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Content.html.twig @@ -0,0 +1,6 @@ +{# @block content The main content area of the card #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Footer.html.twig b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Footer.html.twig new file mode 100644 index 00000000000..f3a25e80f19 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Footer.html.twig @@ -0,0 +1,7 @@ +{# @block content The footer area, typically contains actions or additional information #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Header.html.twig b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Header.html.twig new file mode 100644 index 00000000000..28edf6cfec6 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Header.html.twig @@ -0,0 +1,7 @@ +{# @block content The header area, typically contains `Card:Title` #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Title.html.twig b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Title.html.twig new file mode 100644 index 00000000000..33c00121c39 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/card/templates/components/Card/Title.html.twig @@ -0,0 +1,8 @@ +{# @block content The title text of the card #} +{%- props as = 'span' -%} +<{{ as }} + class="{{ ('text-2xl font-semibold tracking-tight text-heading leading-8 ' ~ attributes.render('class'))|tailwind_merge }}" + {{ attributes }} +> + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/checkbox/examples/Bordered.html.twig b/src/Toolkit/kits/flowbite-4/checkbox/examples/Bordered.html.twig new file mode 100644 index 00000000000..2c8bb34b73f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/examples/Bordered.html.twig @@ -0,0 +1,24 @@ +
+ +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
diff --git a/src/Toolkit/kits/flowbite-4/checkbox/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/checkbox/examples/Demo.html.twig new file mode 100644 index 00000000000..c099990bc70 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/examples/Demo.html.twig @@ -0,0 +1,11 @@ +
+
+ + Default checkbox +
+ +
+ + Checked state +
+
diff --git a/src/Toolkit/kits/flowbite-4/checkbox/examples/Disabled.html.twig b/src/Toolkit/kits/flowbite-4/checkbox/examples/Disabled.html.twig new file mode 100644 index 00000000000..c8b200815dd --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/examples/Disabled.html.twig @@ -0,0 +1,11 @@ +
+
+ + Default checkbox +
+ +
+ + Checked state +
+
diff --git a/src/Toolkit/kits/flowbite-4/checkbox/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/checkbox/examples/Usage.html.twig new file mode 100644 index 00000000000..2706386bc5a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/examples/Usage.html.twig @@ -0,0 +1 @@ + diff --git a/src/Toolkit/kits/flowbite-4/checkbox/manifest.json b/src/Toolkit/kits/flowbite-4/checkbox/manifest.json new file mode 100644 index 00000000000..68400ec4d3d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Checkbox", + "description": "The checkbox component can be used to receive one or more selected options from the user in the form of a square box available in multiple styles, sizes, colors, and variants coded with the utility classes from Tailwind CSS and with support for dark mode.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/checkbox/templates/components/Checkbox.html.twig b/src/Toolkit/kits/flowbite-4/checkbox/templates/components/Checkbox.html.twig new file mode 100644 index 00000000000..728984dca2e --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/checkbox/templates/components/Checkbox.html.twig @@ -0,0 +1,5 @@ + diff --git a/src/Toolkit/kits/flowbite-4/indicator/examples/Count.html.twig b/src/Toolkit/kits/flowbite-4/indicator/examples/Count.html.twig new file mode 100644 index 00000000000..cd58c446688 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/indicator/examples/Count.html.twig @@ -0,0 +1,6 @@ + + diff --git a/src/Toolkit/kits/flowbite-4/indicator/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/indicator/examples/Demo.html.twig new file mode 100644 index 00000000000..e05cd25e0b3 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/indicator/examples/Demo.html.twig @@ -0,0 +1,7 @@ +
+ + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/indicator/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/indicator/examples/Usage.html.twig new file mode 100644 index 00000000000..04e764fd609 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/indicator/examples/Usage.html.twig @@ -0,0 +1,5 @@ + + Value + diff --git a/src/Toolkit/kits/flowbite-4/indicator/manifest.json b/src/Toolkit/kits/flowbite-4/indicator/manifest.json new file mode 100644 index 00000000000..6daff1d581d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/indicator/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Indicator", + "description": "Use the indicator component to show a number count, account status, or as a loading label positioned relative to the parent component coded with Tailwind CSS", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["twig/extra-bundle", "twig/html-extra:^3.12.0", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/indicator/templates/components/Indicator.html.twig b/src/Toolkit/kits/flowbite-4/indicator/templates/components/Indicator.html.twig new file mode 100644 index 00000000000..ff11b33a3d8 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/indicator/templates/components/Indicator.html.twig @@ -0,0 +1,27 @@ +{# @prop variant 'brand'|'gray'|'danger'|'success'|'warning' The visual style variant. Defaults to `brand` #} +{# @prop size 'default'|'lg' The badge size. Defaults to `default` #} +{# @block content The value #} +{%- props variant = 'brand', size = 'default' -%} +{%- set style = html_cva( + base: 'inline-flex items-center justify-center text-xs font-bold rounded-full', + variants: { + variant: { + brand: 'bg-brand text-white', + gray: 'bg-neutral-quaternary text-heading', + danger: 'bg-danger text-white', + success: 'bg-success text-white', + warning: 'bg-warning text-white', + }, + size: { + default: 'size-3', + lg: 'size-6', + }, + }, + +) -%} + + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/input/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/Demo.html.twig new file mode 100644 index 00000000000..28b9b2a9391 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/Demo.html.twig @@ -0,0 +1,41 @@ +
+
+
+ First name + +
+
+ Last name + +
+
+ Company + +
+
+ Phone number + +
+
+ Website URL + +
+
+ Unique visitors (per month) + +
+
+
+ Email address + +
+
+ Password + +
+
+ Confirm password + +
+ Submit +
diff --git a/src/Toolkit/kits/flowbite-4/input/examples/Disabled.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/Disabled.html.twig new file mode 100644 index 00000000000..85a463dcceb --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/Disabled.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/src/Toolkit/kits/flowbite-4/input/examples/File.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/File.html.twig new file mode 100644 index 00000000000..a752a557d32 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/File.html.twig @@ -0,0 +1,4 @@ +
+ Picture + +
diff --git a/src/Toolkit/kits/flowbite-4/input/examples/Invalid.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/Invalid.html.twig new file mode 100644 index 00000000000..2c2b332d52b --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/Invalid.html.twig @@ -0,0 +1,5 @@ +
+ Your name + +

Oh, snapp! Some error message.

+
diff --git a/src/Toolkit/kits/flowbite-4/input/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/Usage.html.twig new file mode 100644 index 00000000000..a5b5550ecc4 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/Usage.html.twig @@ -0,0 +1 @@ + diff --git a/src/Toolkit/kits/flowbite-4/input/examples/With Button.html.twig b/src/Toolkit/kits/flowbite-4/input/examples/With Button.html.twig new file mode 100644 index 00000000000..36c01c5f8c1 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/examples/With Button.html.twig @@ -0,0 +1,7 @@ +
+ + + +
diff --git a/src/Toolkit/kits/flowbite-4/input/manifest.json b/src/Toolkit/kits/flowbite-4/input/manifest.json new file mode 100644 index 00000000000..6e5336f2cd9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Input", + "description": "The input field is an important part of the form element that can be used to create interactive controls to accept data from the user based on multiple input types, such as text, email, number, password, URL, phone number, and more.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/input/templates/components/Input.html.twig b/src/Toolkit/kits/flowbite-4/input/templates/components/Input.html.twig new file mode 100644 index 00000000000..25e6aa4f85a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/input/templates/components/Input.html.twig @@ -0,0 +1,4 @@ + diff --git a/src/Toolkit/kits/flowbite-4/kbd/examples/Arrow.html.twig b/src/Toolkit/kits/flowbite-4/kbd/examples/Arrow.html.twig new file mode 100644 index 00000000000..ed0e80fdc91 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/kbd/examples/Arrow.html.twig @@ -0,0 +1,21 @@ +
+ + + + + + + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/kbd/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/kbd/examples/Demo.html.twig new file mode 100644 index 00000000000..5d4302c347e --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/kbd/examples/Demo.html.twig @@ -0,0 +1,9 @@ +
+ Shift + Ctrl + Tab + Caps Lock + Esc + Spacebar + Enter +
diff --git a/src/Toolkit/kits/flowbite-4/kbd/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/kbd/examples/Usage.html.twig new file mode 100644 index 00000000000..88328847b98 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/kbd/examples/Usage.html.twig @@ -0,0 +1 @@ +Ctrl diff --git a/src/Toolkit/kits/flowbite-4/kbd/manifest.json b/src/Toolkit/kits/flowbite-4/kbd/manifest.json new file mode 100644 index 00000000000..c07773ad3ab --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/kbd/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Kbd", + "description": "The KBD (Keyboard) component can be used to indicate a textual user input from the keyboard inside other elements such as in text, tables, cards, and more.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/kbd/templates/components/Kbd.html.twig b/src/Toolkit/kits/flowbite-4/kbd/templates/components/Kbd.html.twig new file mode 100644 index 00000000000..d376aedd604 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/kbd/templates/components/Kbd.html.twig @@ -0,0 +1,7 @@ +{# @block content The keyboard key text (e.g., "Ctrl", "⌘", "Enter") #} + + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/label/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/label/examples/Demo.html.twig new file mode 100644 index 00000000000..ed679e5f098 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/label/examples/Demo.html.twig @@ -0,0 +1,4 @@ +
+ Company + +
diff --git a/src/Toolkit/kits/flowbite-4/label/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/label/examples/Usage.html.twig new file mode 100644 index 00000000000..f9ac4ab3356 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/label/examples/Usage.html.twig @@ -0,0 +1 @@ +Your email address diff --git a/src/Toolkit/kits/flowbite-4/label/manifest.json b/src/Toolkit/kits/flowbite-4/label/manifest.json new file mode 100644 index 00000000000..bda0ceecaea --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/label/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Label", + "description": "A text element that identifies form controls and other content.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/label/templates/components/Label.html.twig b/src/Toolkit/kits/flowbite-4/label/templates/components/Label.html.twig new file mode 100644 index 00000000000..96c51a8ec76 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/label/templates/components/Label.html.twig @@ -0,0 +1,18 @@ +{# @prop variant 'default'|'invalid' The visual style variant. Defaults to `default` #} +{# @block content The label text for a form control #} +{%- props variant = 'default' -%} +{%- set style = html_cva( + base: 'block text-sm font-medium', + variants: { + variant: { + default: 'text-heading', + invalid: 'text-fg-danger-strong', + }, + }, +) -%} + diff --git a/src/Toolkit/kits/flowbite-4/manifest.json b/src/Toolkit/kits/flowbite-4/manifest.json new file mode 100644 index 00000000000..ae6268622b4 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/manifest.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../schema-kit-v1.json", + "name": "Flowbite v4", + "description": "Component based on the Flowbite (v4) library, popular open-source library of interactive UI components built with the utility classes from Tailwind CSS.", + "license": "MIT", + "homepage": "https://ux.symfony.com/toolkit/kits/flowbite" +} diff --git a/src/Toolkit/kits/flowbite-4/modal/assets/controllers/modal_controller.js b/src/Toolkit/kits/flowbite-4/modal/assets/controllers/modal_controller.js new file mode 100644 index 00000000000..4c5066f0eb9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/assets/controllers/modal_controller.js @@ -0,0 +1,61 @@ +import { Controller } from '@hotwired/stimulus'; + +export default class extends Controller { + static targets = ['trigger', 'modal']; + + static values = { + open: Boolean, + }; + + connect() { + if (this.openValue) { + this.open(); + } + } + + open() { + this.modalTarget.showModal(); + + if (this.hasTriggerTarget) { + if (this.modalTarget.getAnimations().length > 0) { + this.modalTarget.addEventListener( + 'transitionend', + () => { + this.triggerTarget.setAttribute('aria-expanded', 'true'); + this.modalTarget.setAttribute('aria-hidden', 'false'); + }, + { once: true } + ); + } else { + this.triggerTarget.setAttribute('aria-expanded', 'true'); + this.modalTarget.setAttribute('aria-hidden', 'false'); + } + } + } + + closeOnClickOutside({ target }) { + if (target === this.modalTarget) { + this.close(); + } + } + + close() { + this.modalTarget.close(); + + if (this.hasTriggerTarget) { + if (this.modalTarget.getAnimations().length > 0) { + this.modalTarget.addEventListener( + 'transitionend', + () => { + this.triggerTarget.setAttribute('aria-expanded', 'false'); + this.modalTarget.setAttribute('aria-hidden', 'true'); + }, + { once: true } + ); + } else { + this.triggerTarget.setAttribute('aria-expanded', 'false'); + this.modalTarget.setAttribute('aria-hidden', 'true'); + } + } + } +} diff --git a/src/Toolkit/kits/flowbite-4/modal/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/modal/examples/Demo.html.twig new file mode 100644 index 00000000000..5464f5e8bc8 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/examples/Demo.html.twig @@ -0,0 +1,27 @@ + + + Open Modal + + + + + Edit profile + + + +

+ With less than a month to go before the European Union enacts new consumer privacy laws for its citizens, companies around the world are updating their terms of service agreements to comply. +

+

+ The European Union’s General Data Protection Regulation (G.D.P.R.) goes into effect on May 25 and is meant to ensure a common set of data rights in the European Union. It requires organizations to notify users as soon as possible of high-risk data breaches that could personally affect them. +

+
+ + + I accept + + Decline + + +
+
diff --git a/src/Toolkit/kits/flowbite-4/modal/examples/Opened by default.html.twig b/src/Toolkit/kits/flowbite-4/modal/examples/Opened by default.html.twig new file mode 100644 index 00000000000..12ba6b97426 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/examples/Opened by default.html.twig @@ -0,0 +1,27 @@ + + + Open Modal + + + + + Edit profile + + + +

+ With less than a month to go before the European Union enacts new consumer privacy laws for its citizens, companies around the world are updating their terms of service agreements to comply. +

+

+ The European Union’s General Data Protection Regulation (G.D.P.R.) goes into effect on May 25 and is meant to ensure a common set of data rights in the European Union. It requires organizations to notify users as soon as possible of high-risk data breaches that could personally affect them. +

+
+ + + I accept + + Decline + + +
+
diff --git a/src/Toolkit/kits/flowbite-4/modal/examples/Popup.html.twig b/src/Toolkit/kits/flowbite-4/modal/examples/Popup.html.twig new file mode 100644 index 00000000000..546c32848b4 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/examples/Popup.html.twig @@ -0,0 +1,25 @@ + + + Delete + + + + + + + + + diff --git a/src/Toolkit/kits/flowbite-4/modal/examples/Static.html.twig b/src/Toolkit/kits/flowbite-4/modal/examples/Static.html.twig new file mode 100644 index 00000000000..f53b15c7d34 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/examples/Static.html.twig @@ -0,0 +1,24 @@ + + + Open Modal + + + + + Edit profile + + + +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean placerat, velit sit amet interdum auctor, ligula lorem posuere urna, ut lobortis odio odio et leo. Nam scelerisque vel sem vel pulvinar. +

+
+ + + I accept + + Decline + + +
+
diff --git a/src/Toolkit/kits/flowbite-4/modal/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/modal/examples/Usage.html.twig new file mode 100644 index 00000000000..3d9381f984d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/examples/Usage.html.twig @@ -0,0 +1,10 @@ + + + Open + + + + Are you absolutely sure? + + + diff --git a/src/Toolkit/kits/flowbite-4/modal/manifest.json b/src/Toolkit/kits/flowbite-4/modal/manifest.json new file mode 100644 index 00000000000..e6751906e2b --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/manifest.json @@ -0,0 +1,18 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Modal", + "description": "Use the modal component to show interactive dialogs and notifications to your website users available in multiple sizes, colors, and styles", + "copy-files": { + "assets/": "assets/", + "templates/": "templates/" + }, + "dependencies": { + "composer": [ + "symfony/ux-icons", + "twig/extra-bundle", + "twig/html-extra:^3.24.0", + "tales-from-a-dev/twig-tailwind-extra:^1.0.0" + ] + } +} diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal.html.twig new file mode 100644 index 00000000000..3ff1169721e --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal.html.twig @@ -0,0 +1,14 @@ +{# @prop open boolean Whether the modal is open on initial render. Defaults to `false` #} +{# @prop id string Unique identifier used to generate internal Modal IDs #} +{# @block content The modal structure, typically includes `Modal:Trigger` and `Modal:Content` #} +{%- props open = false, id -%} + +{%- set _modal_id = 'modal-' ~ id -%} +{%- set _modal_title_id = _modal_id ~ '-title' -%} +
+ {% block content %}{% endblock %} +
diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Body.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Body.html.twig new file mode 100644 index 00000000000..958fc50da96 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Body.html.twig @@ -0,0 +1,7 @@ +{# @block content The main content area of the moda #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Close.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Close.html.twig new file mode 100644 index 00000000000..5373acea466 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Close.html.twig @@ -0,0 +1,5 @@ +{# @block content The close trigger element (e.g., a `Button`) that closes the modal when clicked #} +{%- set modal_close_attrs = { + 'data-action': 'click->modal#close', +} -%} +{%- block content %}{% endblock -%} diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Content.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Content.html.twig new file mode 100644 index 00000000000..944f7c63a00 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Content.html.twig @@ -0,0 +1,21 @@ +{# @prop showCloseButton boolean Whether to display the close button in the top-right corner. Defaults to `true` #} +{# @prop backdrop 'dynamic'|'static' To prevent the modal from closing when clicking outside. Defaults to `dynamic` #} +{# @block content The modal content, typically includes `Modal:Header` and optionally `Modal:Footer` #} +{%- props showCloseButton = true, backdrop = 'dynamic' -%} + + diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Footer.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Footer.html.twig new file mode 100644 index 00000000000..8eff6e8c41d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Footer.html.twig @@ -0,0 +1,7 @@ +{# @block content The footer area, typically contains action buttons #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Header.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Header.html.twig new file mode 100644 index 00000000000..799958603a5 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Header.html.twig @@ -0,0 +1,7 @@ +{# @block content The header area, typically contains `Modal:Title` and `Modal:Description` #} +
+ {%- block content %}{% endblock -%} +
diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Title.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Title.html.twig new file mode 100644 index 00000000000..d4929e12ea4 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Title.html.twig @@ -0,0 +1,8 @@ +{# @block content The title text of the modal #} +

+ {%- block content %}{% endblock -%} +

diff --git a/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Trigger.html.twig b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Trigger.html.twig new file mode 100644 index 00000000000..2fbf0efd7b0 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/modal/templates/components/Modal/Trigger.html.twig @@ -0,0 +1,7 @@ +{# @block content The trigger element (e.g., a `Button`) that opens the modal when clicked #} +{%- set modal_trigger_attrs = { + 'data-action': 'click->modal#open'|html_attr_type('sst'), + 'data-modal-target': 'trigger', + 'aria-haspopup': 'dialog', +} -%} +{%- block content %}{% endblock -%} diff --git a/src/Toolkit/kits/flowbite-4/pagination/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/pagination/examples/Demo.html.twig new file mode 100644 index 00000000000..f6c8c0fb40a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/examples/Demo.html.twig @@ -0,0 +1,19 @@ + + + + + + + 1 + + + 2 + + + 3 + + + + + + diff --git a/src/Toolkit/kits/flowbite-4/pagination/examples/Icon.html.twig b/src/Toolkit/kits/flowbite-4/pagination/examples/Icon.html.twig new file mode 100644 index 00000000000..3a1cc4967cb --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/examples/Icon.html.twig @@ -0,0 +1,19 @@ + + + + + + + 1 + + + 2 + + + 3 + + + + + + diff --git a/src/Toolkit/kits/flowbite-4/pagination/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/pagination/examples/Usage.html.twig new file mode 100644 index 00000000000..f6c8c0fb40a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/examples/Usage.html.twig @@ -0,0 +1,19 @@ + + + + + + + 1 + + + 2 + + + 3 + + + + + + diff --git a/src/Toolkit/kits/flowbite-4/pagination/manifest.json b/src/Toolkit/kits/flowbite-4/pagination/manifest.json new file mode 100644 index 00000000000..d12ae7ab94f --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Pagination", + "description": "Use the Tailwind CSS pagination element to indicate a series of content across various pages based on multiple styles and sizes", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["symfony/ux-icons", "tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination.html.twig new file mode 100644 index 00000000000..9ba626bb73d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination.html.twig @@ -0,0 +1,8 @@ +{# @block content The pagination structure, typically a `Pagination:Content` #} + diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Content.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Content.html.twig new file mode 100644 index 00000000000..a66b802eacc --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Content.html.twig @@ -0,0 +1,7 @@ +{# @block content The pagination items, typically multiple `Pagination:Item` components #} + diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Item.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Item.html.twig new file mode 100644 index 00000000000..ad88201b67d --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Item.html.twig @@ -0,0 +1,4 @@ +{# @block content The pagination item content, typically a `Pagination:Link` #} + + {%- block content %}{% endblock -%} + diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Link.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Link.html.twig new file mode 100644 index 00000000000..0ebc7eaf1b8 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Link.html.twig @@ -0,0 +1,15 @@ +{# @prop active boolean Whether this is the current page. Defaults to `false` #} +{# @block content The page number or navigation icon #} +{%- props active = false -%} + + {{- block(outerBlocks.content) -}} + diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Next.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Next.html.twig new file mode 100644 index 00000000000..fd4639a1932 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Next.html.twig @@ -0,0 +1,13 @@ +{% props asIcon = false %} + + + {% if asIcon %} + + {% else %} + Next + {% endif %} + diff --git a/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Previous.html.twig b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Previous.html.twig new file mode 100644 index 00000000000..d29d6a53ea4 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/pagination/templates/components/Pagination/Previous.html.twig @@ -0,0 +1,13 @@ +{% props asIcon = false %} + + + {% if asIcon %} + + {% else %} + Previous + {% endif %} + diff --git a/src/Toolkit/kits/flowbite-4/radio/examples/Bordered.html.twig b/src/Toolkit/kits/flowbite-4/radio/examples/Bordered.html.twig new file mode 100644 index 00000000000..efe0d0ae8f9 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/examples/Bordered.html.twig @@ -0,0 +1,24 @@ +
+ +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
diff --git a/src/Toolkit/kits/flowbite-4/radio/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/radio/examples/Demo.html.twig new file mode 100644 index 00000000000..d86dc4f562a --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/examples/Demo.html.twig @@ -0,0 +1,11 @@ +
+
+ + Default radio +
+ +
+ + Checked state +
+
diff --git a/src/Toolkit/kits/flowbite-4/radio/examples/Disabled.html.twig b/src/Toolkit/kits/flowbite-4/radio/examples/Disabled.html.twig new file mode 100644 index 00000000000..c3db37426e1 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/examples/Disabled.html.twig @@ -0,0 +1,11 @@ +
+
+ + Default radio +
+ +
+ + Checked state +
+
diff --git a/src/Toolkit/kits/flowbite-4/radio/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/radio/examples/Usage.html.twig new file mode 100644 index 00000000000..050f46c44ad --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/examples/Usage.html.twig @@ -0,0 +1 @@ + diff --git a/src/Toolkit/kits/flowbite-4/radio/manifest.json b/src/Toolkit/kits/flowbite-4/radio/manifest.json new file mode 100644 index 00000000000..7081aa11dc6 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Radio", + "description": "The radio component can be used to allow the user to choose a single option from one or more available options coded with the utility classes from Tailwind CSS and available in multiple styles, variants, and colors and support dark mode.", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/radio/templates/components/Radio.html.twig b/src/Toolkit/kits/flowbite-4/radio/templates/components/Radio.html.twig new file mode 100644 index 00000000000..d85c37c1638 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/radio/templates/components/Radio.html.twig @@ -0,0 +1,5 @@ + diff --git a/src/Toolkit/kits/flowbite-4/select/examples/Demo.html.twig b/src/Toolkit/kits/flowbite-4/select/examples/Demo.html.twig new file mode 100644 index 00000000000..58e8fe22575 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/examples/Demo.html.twig @@ -0,0 +1,10 @@ +
+ Select an option + + + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/select/examples/Disabled.html.twig b/src/Toolkit/kits/flowbite-4/select/examples/Disabled.html.twig new file mode 100644 index 00000000000..af4935d3ae8 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/examples/Disabled.html.twig @@ -0,0 +1,10 @@ +
+ Select an option + + + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/select/examples/Multiple.html.twig b/src/Toolkit/kits/flowbite-4/select/examples/Multiple.html.twig new file mode 100644 index 00000000000..b6513eb9c34 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/examples/Multiple.html.twig @@ -0,0 +1,10 @@ +
+ Select an option + + + + + + + +
diff --git a/src/Toolkit/kits/flowbite-4/select/examples/Usage.html.twig b/src/Toolkit/kits/flowbite-4/select/examples/Usage.html.twig new file mode 100644 index 00000000000..79abe1d3d70 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/examples/Usage.html.twig @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Toolkit/kits/flowbite-4/select/manifest.json b/src/Toolkit/kits/flowbite-4/select/manifest.json new file mode 100644 index 00000000000..f512209ccd6 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/manifest.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../schema-kit-recipe-v1.json", + "type": "component", + "name": "Select", + "description": "Get started with the select component to allow the user to choose from one or more options from a dropdown list based on multiple styles, sizes, and variants", + "copy-files": { + "templates/": "templates/" + }, + "dependencies": { + "composer": ["tales-from-a-dev/twig-tailwind-extra:^1.0.0"] + } +} diff --git a/src/Toolkit/kits/flowbite-4/select/templates/components/Select.html.twig b/src/Toolkit/kits/flowbite-4/select/templates/components/Select.html.twig new file mode 100644 index 00000000000..ef741369fa6 --- /dev/null +++ b/src/Toolkit/kits/flowbite-4/select/templates/components/Select.html.twig @@ -0,0 +1,7 @@ +{# @block content The select options (`