@panneau/ui 5.0.0-alpha.12 → 5.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/combo-box/ComboBox.css +10 -0
- package/dist/combo-box/ComboBox.d.ts +6 -1
- package/dist/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/combo-box/ComboBox.js +190 -170
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +4 -2
- package/dist/combo-box/ComboBox.module.js.map +1 -1
- package/dist/select/ListBox.css +52 -0
- package/dist/select/ListBox.module.js +7 -1
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.d.ts +13 -0
- package/dist/select/Select.d.ts.map +1 -1
- package/dist/select/Select.js +241 -204
- package/dist/select/Select.js.map +1 -1
- package/dist/text-input/TextInput.js +1 -1
- package/dist/text-input/TextInput.js.map +1 -1
- package/dist/toast/Toast.css +3 -3
- package/dist/toast/Toast.module.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","names":["ReactNode","TextFieldProps","AriaTextFieldProps","Group","Input","TextField","FieldChromeProps","FieldDescription","FieldErrors","FieldLabel","fieldStyles","styles","cx","TextInputProps","Omit","type","placeholder","prefix","suffix","controlClassName","inputClassName","TextInput","t0","$","_c","className","description","descriptionClassName","errorsClassName","isReadOnly","isRequired","label","labelClassName","props","t1","errors","t2","undefined","invalid","length","adorned","t3","field","t4","t5","control","isDisabled","adornment","bare","t6","t7","t8","_c","styles"],"sources":["../../src/text-input/TextInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n type TextFieldProps as AriaTextFieldProps,\n Group,\n Input,\n TextField,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles as styles,\n} from '../field/FieldParts';\nimport { cx } from '../utils/cx';\n\nexport interface TextInputProps\n extends\n Omit<\n AriaTextFieldProps,\n 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'type'\n >,\n FieldChromeProps {\n type?: 'text' | 'email' | 'url' | 'tel' | 'password' | 'search';\n placeholder?: string;\n /** Content before the text, inside the control: a unit, a URL prefix, an icon. */\n prefix?: ReactNode;\n /** Content after the text, inside the control. */\n suffix?: ReactNode;\n /** Class name of the control (the box around the text). */\n controlClassName?: string;\n inputClassName?: string;\n}\n\n/** A single-line text input with its label, description and errors. */\nexport function TextInput({\n label,\n description,\n errors = [],\n placeholder,\n prefix,\n suffix,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n isRequired,\n isReadOnly,\n ...props\n}: TextInputProps) {\n const invalid = errors.length > 0;\n const adorned = prefix !== undefined || suffix !== undefined;\n return (\n <TextField\n {...props}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isInvalid={invalid}\n validationBehavior=\"aria\"\n className={cx('panneau-text-input', styles.field, className)}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n {adorned ? (\n <Group\n className={cx(styles.control, controlClassName)}\n data-invalid={invalid || undefined}\n
|
|
1
|
+
{"version":3,"file":"TextInput.js","names":["ReactNode","TextFieldProps","AriaTextFieldProps","Group","Input","TextField","FieldChromeProps","FieldDescription","FieldErrors","FieldLabel","fieldStyles","styles","cx","TextInputProps","Omit","type","placeholder","prefix","suffix","controlClassName","inputClassName","TextInput","t0","$","_c","className","description","descriptionClassName","errorsClassName","isReadOnly","isRequired","label","labelClassName","props","t1","errors","t2","undefined","invalid","length","adorned","t3","field","t4","t5","control","isDisabled","adornment","bare","t6","t7","t8","_c","styles"],"sources":["../../src/text-input/TextInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n type TextFieldProps as AriaTextFieldProps,\n Group,\n Input,\n TextField,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles as styles,\n} from '../field/FieldParts';\nimport { cx } from '../utils/cx';\n\nexport interface TextInputProps\n extends\n Omit<\n AriaTextFieldProps,\n 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'type'\n >,\n FieldChromeProps {\n type?: 'text' | 'email' | 'url' | 'tel' | 'password' | 'search';\n placeholder?: string;\n /** Content before the text, inside the control: a unit, a URL prefix, an icon. */\n prefix?: ReactNode;\n /** Content after the text, inside the control. */\n suffix?: ReactNode;\n /** Class name of the control (the box around the text). */\n controlClassName?: string;\n inputClassName?: string;\n}\n\n/** A single-line text input with its label, description and errors. */\nexport function TextInput({\n label,\n description,\n errors = [],\n placeholder,\n prefix,\n suffix,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n isRequired,\n isReadOnly,\n ...props\n}: TextInputProps) {\n const invalid = errors.length > 0;\n const adorned = prefix !== undefined || suffix !== undefined;\n return (\n <TextField\n {...props}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isInvalid={invalid}\n validationBehavior=\"aria\"\n className={cx('panneau-text-input', styles.field, className)}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n {adorned ? (\n <Group\n className={cx(styles.control, controlClassName)}\n data-invalid={invalid || undefined}\n isReadOnly={isReadOnly}\n isDisabled={props.isDisabled}\n >\n {prefix !== undefined ? (\n <span\n className={styles.adornment}\n data-text={typeof prefix === 'string' || undefined}\n >\n {prefix}\n </span>\n ) : null}\n <Input placeholder={placeholder} className={cx(styles.bare, inputClassName)} />\n {suffix !== undefined ? (\n <span\n className={styles.adornment}\n data-text={typeof suffix === 'string' || undefined}\n >\n {suffix}\n </span>\n ) : null}\n </Group>\n ) : (\n <Input\n placeholder={placeholder}\n className={cx(styles.control, controlClassName, inputClassName)}\n />\n )}\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </TextField>\n );\n}\n"],"mappings":";;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WAAAG;GANf,UAAA;IAQIE;IAGCC;IA+BDK;IACAC;GA3CM;;EA4CE3B,EAAA,MAAAe;EAAAf,EAAA,MAAAM;EAAAN,EAAA,MAAAO;EAAAP,EAAA,MAAAU;EAAAV,EAAA,MAAAkB;EAAAlB,EAAA,MAAAoB;EAAApB,EAAA,MAAAqB;EAAArB,EAAA,MAAA0B;EAAA1B,EAAA,MAAA2B;EAAA3B,EAAA,MAAA4B;CAAA,OAAAA,KAAA5B,EAAA;CAAA,OA5CZ4B;AA4CY"}
|
package/dist/toast/Toast.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* The region carries the root's class (tokens), since React Aria renders it in the body. */
|
|
2
2
|
.panneau-toast-region.panneau-toast-region {
|
|
3
3
|
position: fixed;
|
|
4
|
-
inset-block-
|
|
4
|
+
inset-block-start: var(--panneau-space-4);
|
|
5
5
|
inset-inline-end: var(--panneau-space-4);
|
|
6
6
|
z-index: var(--panneau-z-toast);
|
|
7
7
|
display: flex;
|
|
8
|
-
flex-direction: column
|
|
8
|
+
flex-direction: column;
|
|
9
9
|
gap: var(--panneau-space-2);
|
|
10
10
|
width: min(var(--panneau-toast-width, 24rem), calc(100vw - 2 * var(--panneau-space-4)));
|
|
11
11
|
background: transparent;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
@media (max-width: 30rem) {
|
|
21
21
|
.panneau-toast-region.panneau-toast-region {
|
|
22
22
|
inset-inline: var(--panneau-space-2);
|
|
23
|
-
inset-block-
|
|
23
|
+
inset-block-start: var(--panneau-space-2);
|
|
24
24
|
width: auto;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.module.js","names":[],"sources":["../../src/toast/Toast.module.css"],"sourcesContent":["/* The region carries the root's class (tokens), since React Aria renders it in the body. */\n.region.region {\n position: fixed;\n inset-block-
|
|
1
|
+
{"version":3,"file":"Toast.module.js","names":[],"sources":["../../src/toast/Toast.module.css"],"sourcesContent":["/* The region carries the root's class (tokens), since React Aria renders it in the body. */\n.region.region {\n position: fixed;\n inset-block-start: var(--panneau-space-4);\n inset-inline-end: var(--panneau-space-4);\n z-index: var(--panneau-z-toast);\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-2);\n width: min(var(--panneau-toast-width, 24rem), calc(100vw - 2 * var(--panneau-space-4)));\n background: transparent;\n outline: none;\n}\n\n.region[data-focus-visible] {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 4px;\n}\n\n@media (max-width: 30rem) {\n .region.region {\n inset-inline: var(--panneau-space-2);\n inset-block-start: var(--panneau-space-2);\n width: auto;\n }\n}\n\n.toast {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-3);\n padding: var(--panneau-space-3) var(--panneau-space-3) var(--panneau-space-3)\n var(--panneau-space-4);\n color: var(--panneau-color-text);\n background-color: var(--panneau-toast-bg, var(--panneau-color-surface-raised));\n border: var(--panneau-border-width) solid\n var(--panneau-toast-border-color, var(--panneau-color-border));\n border-inline-start-width: var(--panneau-toast-tone-width, 4px);\n border-radius: var(--panneau-toast-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-toast-shadow, var(--panneau-shadow-lg));\n outline: none;\n}\n\n.toast[data-focus-visible] {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 2px;\n}\n\n.icon {\n margin-top: 0.125rem;\n}\n\n/* A toast with a tone other than neutral: a colored edge and icon, from its tone class. */\n.toned {\n border-inline-start-color: var(--panneau-tone-text);\n}\n\n.toned .icon {\n color: var(--panneau-tone-text);\n}\n\n.content {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: var(--panneau-space-1);\n min-width: 0;\n padding-top: 0.125rem;\n}\n\n.title {\n font-weight: var(--panneau-font-weight-medium);\n overflow-wrap: anywhere;\n}\n\n.description {\n font-size: var(--panneau-font-size-sm);\n color: var(--panneau-color-text-muted);\n overflow-wrap: anywhere;\n}\n\n.actions {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: var(--panneau-space-1);\n}\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/ui",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.14",
|
|
4
4
|
"description": "Design tokens, themes and accessible primitives of Panneau, built on React Aria Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"react-intl": "^12.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
60
|
+
"@panneau/intl": "5.0.0-alpha.14",
|
|
61
61
|
"lucide-react": "^1.57.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
64
|
+
"@panneau/protocol": "5.0.0-alpha.14"
|
|
65
65
|
}
|
|
66
66
|
}
|