@ttoss/fsl-ui 0.2.4
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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/_virtual/_rolldown/runtime.cjs +30 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +129 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +61 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.mts +61 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +126 -0
- package/dist/components/Button/Button.cjs +80 -0
- package/dist/components/Button/Button.d.cts +68 -0
- package/dist/components/Button/Button.d.mts +68 -0
- package/dist/components/Button/Button.mjs +79 -0
- package/dist/components/Checkbox/Checkbox.cjs +183 -0
- package/dist/components/Checkbox/Checkbox.d.cts +45 -0
- package/dist/components/Checkbox/Checkbox.d.mts +45 -0
- package/dist/components/Checkbox/Checkbox.mjs +182 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +97 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.cts +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.mts +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.mjs +96 -0
- package/dist/components/FileTrigger/FileTrigger.cjs +51 -0
- package/dist/components/FileTrigger/FileTrigger.d.cts +52 -0
- package/dist/components/FileTrigger/FileTrigger.d.mts +52 -0
- package/dist/components/FileTrigger/FileTrigger.mjs +50 -0
- package/dist/components/GridList/GridList.cjs +220 -0
- package/dist/components/GridList/GridList.d.cts +72 -0
- package/dist/components/GridList/GridList.d.mts +72 -0
- package/dist/components/GridList/GridList.mjs +217 -0
- package/dist/components/Group/Group.cjs +77 -0
- package/dist/components/Group/Group.d.cts +61 -0
- package/dist/components/Group/Group.d.mts +61 -0
- package/dist/components/Group/Group.mjs +74 -0
- package/dist/components/Icon/Icon.cjs +52 -0
- package/dist/components/Icon/Icon.mjs +52 -0
- package/dist/components/Icon/glyphs.cjs +72 -0
- package/dist/components/Icon/glyphs.mjs +63 -0
- package/dist/components/Link/Link.cjs +62 -0
- package/dist/components/Link/Link.d.cts +38 -0
- package/dist/components/Link/Link.d.mts +38 -0
- package/dist/components/Link/Link.mjs +61 -0
- package/dist/components/ListBox/ListBox.cjs +126 -0
- package/dist/components/ListBox/ListBox.d.cts +63 -0
- package/dist/components/ListBox/ListBox.d.mts +63 -0
- package/dist/components/ListBox/ListBox.mjs +123 -0
- package/dist/components/Meter/Meter.cjs +126 -0
- package/dist/components/Meter/Meter.d.cts +63 -0
- package/dist/components/Meter/Meter.d.mts +63 -0
- package/dist/components/Meter/Meter.mjs +125 -0
- package/dist/components/NumberField/NumberField.cjs +221 -0
- package/dist/components/NumberField/NumberField.d.cts +68 -0
- package/dist/components/NumberField/NumberField.d.mts +68 -0
- package/dist/components/NumberField/NumberField.mjs +220 -0
- package/dist/components/ProgressBar/ProgressBar.cjs +132 -0
- package/dist/components/ProgressBar/ProgressBar.d.cts +56 -0
- package/dist/components/ProgressBar/ProgressBar.d.mts +56 -0
- package/dist/components/ProgressBar/ProgressBar.mjs +129 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +218 -0
- package/dist/components/RadioGroup/RadioGroup.d.cts +82 -0
- package/dist/components/RadioGroup/RadioGroup.d.mts +82 -0
- package/dist/components/RadioGroup/RadioGroup.mjs +215 -0
- package/dist/components/Select/Select.cjs +253 -0
- package/dist/components/Select/Select.d.cts +86 -0
- package/dist/components/Select/Select.d.mts +86 -0
- package/dist/components/Select/Select.mjs +250 -0
- package/dist/components/Separator/Separator.cjs +64 -0
- package/dist/components/Separator/Separator.d.cts +44 -0
- package/dist/components/Separator/Separator.d.mts +44 -0
- package/dist/components/Separator/Separator.mjs +63 -0
- package/dist/components/Slider/Slider.cjs +160 -0
- package/dist/components/Slider/Slider.d.cts +45 -0
- package/dist/components/Slider/Slider.d.mts +45 -0
- package/dist/components/Slider/Slider.mjs +159 -0
- package/dist/components/Switch/Switch.cjs +176 -0
- package/dist/components/Switch/Switch.d.cts +43 -0
- package/dist/components/Switch/Switch.d.mts +43 -0
- package/dist/components/Switch/Switch.mjs +175 -0
- package/dist/components/Tabs/Tabs.cjs +180 -0
- package/dist/components/Tabs/Tabs.d.cts +85 -0
- package/dist/components/Tabs/Tabs.d.mts +85 -0
- package/dist/components/Tabs/Tabs.mjs +173 -0
- package/dist/components/Toast/Toast.cjs +218 -0
- package/dist/components/Toast/Toast.d.cts +96 -0
- package/dist/components/Toast/Toast.d.mts +96 -0
- package/dist/components/Toast/Toast.mjs +214 -0
- package/dist/components/ToggleButton/ToggleButton.cjs +125 -0
- package/dist/components/ToggleButton/ToggleButton.d.cts +43 -0
- package/dist/components/ToggleButton/ToggleButton.d.mts +43 -0
- package/dist/components/ToggleButton/ToggleButton.mjs +124 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.cjs +48 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.cts +41 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.mts +41 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.mjs +47 -0
- package/dist/components/Toolbar/Toolbar.cjs +67 -0
- package/dist/components/Toolbar/Toolbar.d.cts +60 -0
- package/dist/components/Toolbar/Toolbar.d.mts +60 -0
- package/dist/components/Toolbar/Toolbar.mjs +66 -0
- package/dist/composites/Accordion/Accordion.cjs +279 -0
- package/dist/composites/Accordion/Accordion.d.cts +176 -0
- package/dist/composites/Accordion/Accordion.d.mts +176 -0
- package/dist/composites/Accordion/Accordion.mjs +270 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.cjs +206 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.cts +166 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.d.mts +166 -0
- package/dist/composites/ConfirmationDialog/ConfirmationDialog.mjs +203 -0
- package/dist/composites/Dialog/Dialog.cjs +372 -0
- package/dist/composites/Dialog/Dialog.d.cts +234 -0
- package/dist/composites/Dialog/Dialog.d.mts +234 -0
- package/dist/composites/Dialog/Dialog.mjs +360 -0
- package/dist/composites/Disclosure/Disclosure.cjs +214 -0
- package/dist/composites/Disclosure/Disclosure.d.cts +118 -0
- package/dist/composites/Disclosure/Disclosure.d.mts +118 -0
- package/dist/composites/Disclosure/Disclosure.mjs +207 -0
- package/dist/composites/Form/Form.cjs +161 -0
- package/dist/composites/Form/Form.d.cts +176 -0
- package/dist/composites/Form/Form.d.mts +176 -0
- package/dist/composites/Form/Form.mjs +156 -0
- package/dist/composites/Menu/Menu.cjs +190 -0
- package/dist/composites/Menu/Menu.d.cts +158 -0
- package/dist/composites/Menu/Menu.d.mts +158 -0
- package/dist/composites/Menu/Menu.mjs +186 -0
- package/dist/composites/Popover/Popover.cjs +80 -0
- package/dist/composites/Popover/Popover.d.cts +56 -0
- package/dist/composites/Popover/Popover.d.mts +56 -0
- package/dist/composites/Popover/Popover.mjs +78 -0
- package/dist/composites/SearchField/SearchField.cjs +194 -0
- package/dist/composites/SearchField/SearchField.d.cts +81 -0
- package/dist/composites/SearchField/SearchField.d.mts +81 -0
- package/dist/composites/SearchField/SearchField.mjs +189 -0
- package/dist/composites/TagGroup/TagGroup.cjs +212 -0
- package/dist/composites/TagGroup/TagGroup.d.cts +84 -0
- package/dist/composites/TagGroup/TagGroup.d.mts +84 -0
- package/dist/composites/TagGroup/TagGroup.mjs +209 -0
- package/dist/composites/TextArea/TextArea.cjs +190 -0
- package/dist/composites/TextArea/TextArea.d.cts +95 -0
- package/dist/composites/TextArea/TextArea.d.mts +95 -0
- package/dist/composites/TextArea/TextArea.mjs +181 -0
- package/dist/composites/TextField/TextField.cjs +200 -0
- package/dist/composites/TextField/TextField.d.cts +111 -0
- package/dist/composites/TextField/TextField.d.mts +111 -0
- package/dist/composites/TextField/TextField.mjs +191 -0
- package/dist/composites/Tooltip/Tooltip.cjs +79 -0
- package/dist/composites/Tooltip/Tooltip.d.cts +53 -0
- package/dist/composites/Tooltip/Tooltip.d.mts +53 -0
- package/dist/composites/Tooltip/Tooltip.mjs +77 -0
- package/dist/composites/Wizard/Wizard.cjs +333 -0
- package/dist/composites/Wizard/Wizard.d.cts +206 -0
- package/dist/composites/Wizard/Wizard.d.mts +206 -0
- package/dist/composites/Wizard/Wizard.mjs +324 -0
- package/dist/composites/scope.cjs +124 -0
- package/dist/composites/scope.mjs +121 -0
- package/dist/index.cjs +186 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.mts +37 -0
- package/dist/index.mjs +39 -0
- package/dist/semantics/componentMeta.d.cts +37 -0
- package/dist/semantics/componentMeta.d.mts +37 -0
- package/dist/semantics/index.cjs +16 -0
- package/dist/semantics/index.d.cts +4 -0
- package/dist/semantics/index.d.mts +4 -0
- package/dist/semantics/index.mjs +3 -0
- package/dist/semantics/taxonomy.cjs +150 -0
- package/dist/semantics/taxonomy.d.cts +153 -0
- package/dist/semantics/taxonomy.d.mts +153 -0
- package/dist/semantics/taxonomy.mjs +140 -0
- package/dist/tokens/escapeHatch.cjs +13 -0
- package/dist/tokens/escapeHatch.mjs +13 -0
- package/dist/tokens/focusRing.cjs +28 -0
- package/dist/tokens/focusRing.mjs +28 -0
- package/dist/tokens/keyframes.cjs +76 -0
- package/dist/tokens/keyframes.mjs +75 -0
- package/dist/tokens/resolveInteractiveStyle.cjs +41 -0
- package/dist/tokens/resolveInteractiveStyle.mjs +41 -0
- package/llms.txt +142 -0
- package/package.json +70 -0
- package/src/tokens/CONTRACT.md +505 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { GridListItemProps, GridListProps } from "react-aria-components";
|
|
4
|
+
|
|
5
|
+
//#region src/components/GridList/GridList.d.ts
|
|
6
|
+
/** Formal semantic identity — GridList root (Collection entity, surface). */
|
|
7
|
+
declare const gridListMeta: {
|
|
8
|
+
readonly displayName: "GridList";
|
|
9
|
+
readonly entity: "Collection";
|
|
10
|
+
readonly structure: "root";
|
|
11
|
+
};
|
|
12
|
+
/** Formal semantic identity — GridListItem (Selection entity, selectable row). */
|
|
13
|
+
declare const gridListItemMeta: {
|
|
14
|
+
readonly displayName: "GridListItem";
|
|
15
|
+
readonly entity: "Selection";
|
|
16
|
+
readonly structure: "item";
|
|
17
|
+
readonly composition: "selection";
|
|
18
|
+
};
|
|
19
|
+
/** Props for the GridList component. */
|
|
20
|
+
type GridListProps$1<T extends object = object> = Omit<GridListProps<T>, 'style' | 'className'>;
|
|
21
|
+
/**
|
|
22
|
+
* A standalone semantic grid list built on React Aria's `GridList` — rows of
|
|
23
|
+
* selectable content, each with a selection checkbox.
|
|
24
|
+
*
|
|
25
|
+
* Per ADR-007 the CONTAINER is Entity = Collection (an `informational`
|
|
26
|
+
* surface) and each `GridListItem` is Entity = Selection (`input` chrome).
|
|
27
|
+
* Set `selectionMode="single|multiple"`. Use `GridListItem` per row (pass
|
|
28
|
+
* `textValue` when the row content is not plain text).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <GridList aria-label="Files" selectionMode="multiple">
|
|
33
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
34
|
+
* <GridListItem id="b" textValue="Notes">Notes.txt</GridListItem>
|
|
35
|
+
* </GridList>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const GridList: {
|
|
39
|
+
<T extends object = object>({
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}: GridListProps$1<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
displayName: "GridList";
|
|
44
|
+
};
|
|
45
|
+
/** Props for the GridListItem component. */
|
|
46
|
+
type GridListItemProps$1 = Omit<GridListItemProps, 'style' | 'className' | 'children'> & {
|
|
47
|
+
/**
|
|
48
|
+
* Row content. Plain nodes only — the item owns its render prop
|
|
49
|
+
* internally (selection control + content wrapper), so React Aria's
|
|
50
|
+
* function-children form is not part of this API.
|
|
51
|
+
*/
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A single selectable row inside a `GridList`. Entity = Selection → reads
|
|
56
|
+
* `vars.colors.input.primary.*`, renders a `selectionControl` checkbox, and
|
|
57
|
+
* surfaces the `selected` State.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare const GridListItem: {
|
|
65
|
+
({
|
|
66
|
+
children,
|
|
67
|
+
...props
|
|
68
|
+
}: GridListItemProps$1): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: "GridListItem";
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { GridList, GridListItem, GridListItemProps$1 as GridListItemProps, GridListProps$1 as GridListProps, gridListItemMeta, gridListMeta };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
import { GridListItemProps, GridListProps } from "react-aria-components";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/GridList/GridList.d.ts
|
|
6
|
+
/** Formal semantic identity — GridList root (Collection entity, surface). */
|
|
7
|
+
declare const gridListMeta: {
|
|
8
|
+
readonly displayName: "GridList";
|
|
9
|
+
readonly entity: "Collection";
|
|
10
|
+
readonly structure: "root";
|
|
11
|
+
};
|
|
12
|
+
/** Formal semantic identity — GridListItem (Selection entity, selectable row). */
|
|
13
|
+
declare const gridListItemMeta: {
|
|
14
|
+
readonly displayName: "GridListItem";
|
|
15
|
+
readonly entity: "Selection";
|
|
16
|
+
readonly structure: "item";
|
|
17
|
+
readonly composition: "selection";
|
|
18
|
+
};
|
|
19
|
+
/** Props for the GridList component. */
|
|
20
|
+
type GridListProps$1<T extends object = object> = Omit<GridListProps<T>, 'style' | 'className'>;
|
|
21
|
+
/**
|
|
22
|
+
* A standalone semantic grid list built on React Aria's `GridList` — rows of
|
|
23
|
+
* selectable content, each with a selection checkbox.
|
|
24
|
+
*
|
|
25
|
+
* Per ADR-007 the CONTAINER is Entity = Collection (an `informational`
|
|
26
|
+
* surface) and each `GridListItem` is Entity = Selection (`input` chrome).
|
|
27
|
+
* Set `selectionMode="single|multiple"`. Use `GridListItem` per row (pass
|
|
28
|
+
* `textValue` when the row content is not plain text).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <GridList aria-label="Files" selectionMode="multiple">
|
|
33
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
34
|
+
* <GridListItem id="b" textValue="Notes">Notes.txt</GridListItem>
|
|
35
|
+
* </GridList>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const GridList$1: {
|
|
39
|
+
<T extends object = object>({
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}: GridListProps$1<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
displayName: "GridList";
|
|
44
|
+
};
|
|
45
|
+
/** Props for the GridListItem component. */
|
|
46
|
+
type GridListItemProps$1 = Omit<GridListItemProps, 'style' | 'className' | 'children'> & {
|
|
47
|
+
/**
|
|
48
|
+
* Row content. Plain nodes only — the item owns its render prop
|
|
49
|
+
* internally (selection control + content wrapper), so React Aria's
|
|
50
|
+
* function-children form is not part of this API.
|
|
51
|
+
*/
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A single selectable row inside a `GridList`. Entity = Selection → reads
|
|
56
|
+
* `vars.colors.input.primary.*`, renders a `selectionControl` checkbox, and
|
|
57
|
+
* surfaces the `selected` State.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare const GridListItem$1: {
|
|
65
|
+
({
|
|
66
|
+
children,
|
|
67
|
+
...props
|
|
68
|
+
}: GridListItemProps$1): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: "GridListItem";
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { GridList$1 as GridList, GridListItem$1 as GridListItem, GridListItemProps$1 as GridListItemProps, GridListProps$1 as GridListProps, gridListItemMeta, gridListMeta };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { focusRingOutline } from "../../tokens/focusRing.mjs";
|
|
3
|
+
import { resolveInteractiveStyle } from "../../tokens/resolveInteractiveStyle.mjs";
|
|
4
|
+
import { Icon } from "../Icon/Icon.mjs";
|
|
5
|
+
import { vars } from "@ttoss/fsl-theme/vars";
|
|
6
|
+
import { Checkbox, GridList, GridListItem } from "react-aria-components";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/GridList/GridList.tsx
|
|
10
|
+
/** Formal semantic identity — GridList root (Collection entity, surface). */
|
|
11
|
+
var gridListMeta = {
|
|
12
|
+
displayName: "GridList",
|
|
13
|
+
entity: "Collection",
|
|
14
|
+
structure: "root"
|
|
15
|
+
};
|
|
16
|
+
/** Formal semantic identity — GridListItem (Selection entity, selectable row). */
|
|
17
|
+
var gridListItemMeta = {
|
|
18
|
+
displayName: "GridListItem",
|
|
19
|
+
entity: "Selection",
|
|
20
|
+
structure: "item",
|
|
21
|
+
composition: "selection"
|
|
22
|
+
};
|
|
23
|
+
/** Row (item) chrome — reflects the `selected` set-membership State. */
|
|
24
|
+
var buildRowStyle = ({
|
|
25
|
+
c,
|
|
26
|
+
isSelected,
|
|
27
|
+
isHovered,
|
|
28
|
+
isFocusVisible,
|
|
29
|
+
isDisabled
|
|
30
|
+
}) => {
|
|
31
|
+
return {
|
|
32
|
+
boxSizing: "border-box",
|
|
33
|
+
display: "flex",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
gap: vars.spacing.gap.inline.sm,
|
|
36
|
+
minHeight: vars.sizing.hit.base,
|
|
37
|
+
paddingBlock: vars.spacing.inset.control.sm,
|
|
38
|
+
paddingInline: vars.spacing.inset.control.md,
|
|
39
|
+
borderRadius: vars.radii.control,
|
|
40
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
41
|
+
opacity: isDisabled ? vars.opacity.disabled : void 0,
|
|
42
|
+
...vars.text.label.md,
|
|
43
|
+
transitionProperty: "background-color, color",
|
|
44
|
+
transitionDuration: vars.motion.feedback.duration,
|
|
45
|
+
transitionTimingFunction: vars.motion.feedback.easing,
|
|
46
|
+
backgroundColor: resolveInteractiveStyle(c?.background, {
|
|
47
|
+
isDisabled,
|
|
48
|
+
isSelected,
|
|
49
|
+
isHovered
|
|
50
|
+
}),
|
|
51
|
+
color: resolveInteractiveStyle(c?.text, {
|
|
52
|
+
isDisabled,
|
|
53
|
+
isSelected,
|
|
54
|
+
isHovered
|
|
55
|
+
}) ?? c?.text?.default,
|
|
56
|
+
outline: focusRingOutline(isFocusVisible),
|
|
57
|
+
outlineOffset: "-2px"
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var SELECTION_BOX_SIZE = "1.125rem";
|
|
61
|
+
/** Static box chrome for the row's selection checkbox. */
|
|
62
|
+
var SELECTION_BOX_STYLE = {
|
|
63
|
+
boxSizing: "border-box",
|
|
64
|
+
flexShrink: 0,
|
|
65
|
+
display: "inline-flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
justifyContent: "center",
|
|
68
|
+
width: SELECTION_BOX_SIZE,
|
|
69
|
+
height: SELECTION_BOX_SIZE,
|
|
70
|
+
borderRadius: vars.radii.control,
|
|
71
|
+
borderWidth: vars.border.outline.control.width,
|
|
72
|
+
borderStyle: vars.border.outline.control.style
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Selection-box colors resolved once (checked vs default). Hoisted so the
|
|
76
|
+
* render callback stays under the cyclomatic-complexity limit.
|
|
77
|
+
*/
|
|
78
|
+
var buildSelectionBoxStyle = ({
|
|
79
|
+
c,
|
|
80
|
+
on
|
|
81
|
+
}) => {
|
|
82
|
+
const text = c?.text;
|
|
83
|
+
const key = on ? "checked" : "default";
|
|
84
|
+
return {
|
|
85
|
+
...SELECTION_BOX_STYLE,
|
|
86
|
+
backgroundColor: c?.background?.[key],
|
|
87
|
+
borderColor: c?.border?.[key],
|
|
88
|
+
color: text?.checked ?? text?.default
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* The per-row selection control (a checkbox). Internal — RAC wires it to the
|
|
93
|
+
* row's selection via `slot="selection"`; reads `input.primary` chrome.
|
|
94
|
+
*/
|
|
95
|
+
var RowSelectionControl = () => {
|
|
96
|
+
const c = vars.colors.input.primary;
|
|
97
|
+
return /* @__PURE__ */jsx(Checkbox, {
|
|
98
|
+
slot: "selection",
|
|
99
|
+
"data-scope": "grid-list",
|
|
100
|
+
"data-part": "selectionControl",
|
|
101
|
+
style: {
|
|
102
|
+
display: "inline-flex"
|
|
103
|
+
},
|
|
104
|
+
children: ({
|
|
105
|
+
isSelected,
|
|
106
|
+
isIndeterminate
|
|
107
|
+
}) => {
|
|
108
|
+
const on = isSelected || isIndeterminate;
|
|
109
|
+
return /* @__PURE__ */jsx("span", {
|
|
110
|
+
"aria-hidden": true,
|
|
111
|
+
style: buildSelectionBoxStyle({
|
|
112
|
+
c,
|
|
113
|
+
on
|
|
114
|
+
}),
|
|
115
|
+
children: on && /* @__PURE__ */jsx(Icon, {
|
|
116
|
+
intent: isIndeterminate ? "selection.indeterminate" : "selection.checked",
|
|
117
|
+
size: "sm"
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* A standalone semantic grid list built on React Aria's `GridList` — rows of
|
|
125
|
+
* selectable content, each with a selection checkbox.
|
|
126
|
+
*
|
|
127
|
+
* Per ADR-007 the CONTAINER is Entity = Collection (an `informational`
|
|
128
|
+
* surface) and each `GridListItem` is Entity = Selection (`input` chrome).
|
|
129
|
+
* Set `selectionMode="single|multiple"`. Use `GridListItem` per row (pass
|
|
130
|
+
* `textValue` when the row content is not plain text).
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```tsx
|
|
134
|
+
* <GridList aria-label="Files" selectionMode="multiple">
|
|
135
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
136
|
+
* <GridListItem id="b" textValue="Notes">Notes.txt</GridListItem>
|
|
137
|
+
* </GridList>
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
var GridList$1 = ({
|
|
141
|
+
children,
|
|
142
|
+
...props
|
|
143
|
+
}) => {
|
|
144
|
+
const surface = vars.colors.informational.primary;
|
|
145
|
+
return /* @__PURE__ */jsx(GridList, {
|
|
146
|
+
...props,
|
|
147
|
+
"data-scope": "grid-list",
|
|
148
|
+
"data-part": "root",
|
|
149
|
+
style: {
|
|
150
|
+
boxSizing: "border-box",
|
|
151
|
+
display: "flex",
|
|
152
|
+
flexDirection: "column",
|
|
153
|
+
gap: vars.spacing.gap.stack.xs,
|
|
154
|
+
padding: vars.spacing.inset.surface.sm,
|
|
155
|
+
borderRadius: vars.radii.surface,
|
|
156
|
+
borderWidth: vars.border.outline.surface.width,
|
|
157
|
+
borderStyle: vars.border.outline.surface.style,
|
|
158
|
+
borderColor: surface?.border?.default ?? "transparent",
|
|
159
|
+
backgroundColor: surface?.background?.default
|
|
160
|
+
},
|
|
161
|
+
children
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
GridList$1.displayName = gridListMeta.displayName;
|
|
165
|
+
/**
|
|
166
|
+
* A single selectable row inside a `GridList`. Entity = Selection → reads
|
|
167
|
+
* `vars.colors.input.primary.*`, renders a `selectionControl` checkbox, and
|
|
168
|
+
* surfaces the `selected` State.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```tsx
|
|
172
|
+
* <GridListItem id="a" textValue="Report">Report.pdf</GridListItem>
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
var GridListItem$1 = ({
|
|
176
|
+
children,
|
|
177
|
+
...props
|
|
178
|
+
}) => {
|
|
179
|
+
const c = vars.colors.input.primary;
|
|
180
|
+
return /* @__PURE__ */jsx(GridListItem, {
|
|
181
|
+
...props,
|
|
182
|
+
"data-scope": "grid-list",
|
|
183
|
+
"data-part": "item",
|
|
184
|
+
style: ({
|
|
185
|
+
isSelected,
|
|
186
|
+
isHovered,
|
|
187
|
+
isFocusVisible,
|
|
188
|
+
isDisabled
|
|
189
|
+
}) => {
|
|
190
|
+
return buildRowStyle({
|
|
191
|
+
c,
|
|
192
|
+
isSelected,
|
|
193
|
+
isHovered,
|
|
194
|
+
isFocusVisible,
|
|
195
|
+
isDisabled
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
children: ({
|
|
199
|
+
selectionMode
|
|
200
|
+
}) => {
|
|
201
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
202
|
+
children: [selectionMode !== "none" && /* @__PURE__ */jsx(RowSelectionControl, {}), /* @__PURE__ */jsx("span", {
|
|
203
|
+
"data-scope": "grid-list",
|
|
204
|
+
"data-part": "content",
|
|
205
|
+
style: {
|
|
206
|
+
flex: 1
|
|
207
|
+
},
|
|
208
|
+
children
|
|
209
|
+
})]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
GridListItem$1.displayName = gridListItemMeta.displayName;
|
|
215
|
+
|
|
216
|
+
//#endregion
|
|
217
|
+
export { GridList$1 as GridList, GridListItem$1 as GridListItem, gridListItemMeta, gridListMeta };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
|
|
4
|
+
let react_aria_components = require("react-aria-components");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_runtime.__toESM(react);
|
|
8
|
+
|
|
9
|
+
//#region src/components/Group/Group.tsx
|
|
10
|
+
/** Formal semantic identity — Group root (Structure entity, grouping frame). */
|
|
11
|
+
var groupMeta = {
|
|
12
|
+
displayName: "Group",
|
|
13
|
+
entity: "Structure",
|
|
14
|
+
structure: "root"
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A semantic grouping frame built on React Aria's `Group` (`role="group"`).
|
|
18
|
+
*
|
|
19
|
+
* Entity = Structure → reads `vars.colors.informational.{primary|muted}` for
|
|
20
|
+
* the boundary and label color, `vars.radii.surface` for the corner, and
|
|
21
|
+
* `vars.spacing.inset.surface` for its padding. Use it to associate a set of
|
|
22
|
+
* related controls (a segmented address block, a pair of range inputs, a
|
|
23
|
+
* toolbar of filters) under one accessible region. Non-interactive: it has no
|
|
24
|
+
* hover/focus chrome of its own; keyboard behavior belongs to the controls
|
|
25
|
+
* inside it.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Group label="Shipping address">
|
|
30
|
+
* <TextField><TextFieldLabel>Street</TextFieldLabel><TextFieldControl /></TextField>
|
|
31
|
+
* <TextField><TextFieldLabel>City</TextFieldLabel><TextFieldControl /></TextField>
|
|
32
|
+
* </Group>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
var Group = ({
|
|
36
|
+
label,
|
|
37
|
+
evaluation = "primary",
|
|
38
|
+
children,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const c = _ttoss_fsl_theme_vars.vars.colors.informational[evaluation];
|
|
42
|
+
const labelId = react.useId();
|
|
43
|
+
const borderColor = c?.border?.default ?? "transparent";
|
|
44
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(react_aria_components.Group, {
|
|
45
|
+
...props,
|
|
46
|
+
"aria-labelledby": label != null ? labelId : props["aria-labelledby"],
|
|
47
|
+
"data-scope": "group",
|
|
48
|
+
"data-part": "root",
|
|
49
|
+
"data-evaluation": evaluation,
|
|
50
|
+
style: {
|
|
51
|
+
boxSizing: "border-box",
|
|
52
|
+
display: "flex",
|
|
53
|
+
flexDirection: "column",
|
|
54
|
+
gap: _ttoss_fsl_theme_vars.vars.spacing.gap.stack.sm,
|
|
55
|
+
padding: _ttoss_fsl_theme_vars.vars.spacing.inset.surface.md,
|
|
56
|
+
borderRadius: _ttoss_fsl_theme_vars.vars.radii.surface,
|
|
57
|
+
borderWidth: _ttoss_fsl_theme_vars.vars.border.outline.surface.width,
|
|
58
|
+
borderStyle: _ttoss_fsl_theme_vars.vars.border.outline.surface.style,
|
|
59
|
+
borderColor
|
|
60
|
+
},
|
|
61
|
+
children: [label != null && /* @__PURE__ */(0, react_jsx_runtime.jsx)("span", {
|
|
62
|
+
id: labelId,
|
|
63
|
+
"data-scope": "group",
|
|
64
|
+
"data-part": "label",
|
|
65
|
+
style: {
|
|
66
|
+
color: c?.text?.default,
|
|
67
|
+
..._ttoss_fsl_theme_vars.vars.text.title.sm
|
|
68
|
+
},
|
|
69
|
+
children: label
|
|
70
|
+
}), children]
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
Group.displayName = groupMeta.displayName;
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
exports.Group = Group;
|
|
77
|
+
exports.groupMeta = groupMeta;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
import { EvaluationsFor } from "../../semantics/taxonomy.cjs";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { GroupProps } from "react-aria-components";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Group/Group.d.ts
|
|
7
|
+
/** Formal semantic identity — Group root (Structure entity, grouping frame). */
|
|
8
|
+
declare const groupMeta: {
|
|
9
|
+
readonly displayName: "Group";
|
|
10
|
+
readonly entity: "Structure";
|
|
11
|
+
readonly structure: "root";
|
|
12
|
+
};
|
|
13
|
+
/** Props for the Group component. */
|
|
14
|
+
interface GroupProps$1 extends Omit<GroupProps, 'style' | 'className' | 'children'> {
|
|
15
|
+
/**
|
|
16
|
+
* Optional visible label for the group. When provided it is rendered above
|
|
17
|
+
* the grouped content and wired to the `role="group"` region via
|
|
18
|
+
* `aria-labelledby`, giving the region an accessible name. Supply
|
|
19
|
+
* caller-localized copy (i18n rule / §6) — it is display text, not a
|
|
20
|
+
* flow-critical label, so it has no default.
|
|
21
|
+
*/
|
|
22
|
+
label?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Authorial emphasis of the frame chrome. `primary` is the standard
|
|
25
|
+
* grouping boundary; `muted` is a subdued variant for dense layouts.
|
|
26
|
+
* @default 'primary'
|
|
27
|
+
*/
|
|
28
|
+
evaluation?: EvaluationsFor<(typeof groupMeta)['entity']>;
|
|
29
|
+
/** The related controls to group. */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A semantic grouping frame built on React Aria's `Group` (`role="group"`).
|
|
34
|
+
*
|
|
35
|
+
* Entity = Structure → reads `vars.colors.informational.{primary|muted}` for
|
|
36
|
+
* the boundary and label color, `vars.radii.surface` for the corner, and
|
|
37
|
+
* `vars.spacing.inset.surface` for its padding. Use it to associate a set of
|
|
38
|
+
* related controls (a segmented address block, a pair of range inputs, a
|
|
39
|
+
* toolbar of filters) under one accessible region. Non-interactive: it has no
|
|
40
|
+
* hover/focus chrome of its own; keyboard behavior belongs to the controls
|
|
41
|
+
* inside it.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Group label="Shipping address">
|
|
46
|
+
* <TextField><TextFieldLabel>Street</TextFieldLabel><TextFieldControl /></TextField>
|
|
47
|
+
* <TextField><TextFieldLabel>City</TextFieldLabel><TextFieldControl /></TextField>
|
|
48
|
+
* </Group>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare const Group: {
|
|
52
|
+
({
|
|
53
|
+
label,
|
|
54
|
+
evaluation,
|
|
55
|
+
children,
|
|
56
|
+
...props
|
|
57
|
+
}: GroupProps$1): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
displayName: "Group";
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Group, GroupProps$1 as GroupProps, groupMeta };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
import { EvaluationsFor } from "../../semantics/taxonomy.mjs";
|
|
3
|
+
import { GroupProps } from "react-aria-components";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Group/Group.d.ts
|
|
7
|
+
/** Formal semantic identity — Group root (Structure entity, grouping frame). */
|
|
8
|
+
declare const groupMeta: {
|
|
9
|
+
readonly displayName: "Group";
|
|
10
|
+
readonly entity: "Structure";
|
|
11
|
+
readonly structure: "root";
|
|
12
|
+
};
|
|
13
|
+
/** Props for the Group component. */
|
|
14
|
+
interface GroupProps$1 extends Omit<GroupProps, 'style' | 'className' | 'children'> {
|
|
15
|
+
/**
|
|
16
|
+
* Optional visible label for the group. When provided it is rendered above
|
|
17
|
+
* the grouped content and wired to the `role="group"` region via
|
|
18
|
+
* `aria-labelledby`, giving the region an accessible name. Supply
|
|
19
|
+
* caller-localized copy (i18n rule / §6) — it is display text, not a
|
|
20
|
+
* flow-critical label, so it has no default.
|
|
21
|
+
*/
|
|
22
|
+
label?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Authorial emphasis of the frame chrome. `primary` is the standard
|
|
25
|
+
* grouping boundary; `muted` is a subdued variant for dense layouts.
|
|
26
|
+
* @default 'primary'
|
|
27
|
+
*/
|
|
28
|
+
evaluation?: EvaluationsFor<(typeof groupMeta)['entity']>;
|
|
29
|
+
/** The related controls to group. */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A semantic grouping frame built on React Aria's `Group` (`role="group"`).
|
|
34
|
+
*
|
|
35
|
+
* Entity = Structure → reads `vars.colors.informational.{primary|muted}` for
|
|
36
|
+
* the boundary and label color, `vars.radii.surface` for the corner, and
|
|
37
|
+
* `vars.spacing.inset.surface` for its padding. Use it to associate a set of
|
|
38
|
+
* related controls (a segmented address block, a pair of range inputs, a
|
|
39
|
+
* toolbar of filters) under one accessible region. Non-interactive: it has no
|
|
40
|
+
* hover/focus chrome of its own; keyboard behavior belongs to the controls
|
|
41
|
+
* inside it.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Group label="Shipping address">
|
|
46
|
+
* <TextField><TextFieldLabel>Street</TextFieldLabel><TextFieldControl /></TextField>
|
|
47
|
+
* <TextField><TextFieldLabel>City</TextFieldLabel><TextFieldControl /></TextField>
|
|
48
|
+
* </Group>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare const Group$1: {
|
|
52
|
+
({
|
|
53
|
+
label,
|
|
54
|
+
evaluation,
|
|
55
|
+
children,
|
|
56
|
+
...props
|
|
57
|
+
}: GroupProps$1): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
displayName: "Group";
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Group$1 as Group, GroupProps$1 as GroupProps, groupMeta };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
import { vars } from "@ttoss/fsl-theme/vars";
|
|
3
|
+
import { Group } from "react-aria-components";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Group/Group.tsx
|
|
8
|
+
/** Formal semantic identity — Group root (Structure entity, grouping frame). */
|
|
9
|
+
var groupMeta = {
|
|
10
|
+
displayName: "Group",
|
|
11
|
+
entity: "Structure",
|
|
12
|
+
structure: "root"
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A semantic grouping frame built on React Aria's `Group` (`role="group"`).
|
|
16
|
+
*
|
|
17
|
+
* Entity = Structure → reads `vars.colors.informational.{primary|muted}` for
|
|
18
|
+
* the boundary and label color, `vars.radii.surface` for the corner, and
|
|
19
|
+
* `vars.spacing.inset.surface` for its padding. Use it to associate a set of
|
|
20
|
+
* related controls (a segmented address block, a pair of range inputs, a
|
|
21
|
+
* toolbar of filters) under one accessible region. Non-interactive: it has no
|
|
22
|
+
* hover/focus chrome of its own; keyboard behavior belongs to the controls
|
|
23
|
+
* inside it.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Group label="Shipping address">
|
|
28
|
+
* <TextField><TextFieldLabel>Street</TextFieldLabel><TextFieldControl /></TextField>
|
|
29
|
+
* <TextField><TextFieldLabel>City</TextFieldLabel><TextFieldControl /></TextField>
|
|
30
|
+
* </Group>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
var Group$1 = ({
|
|
34
|
+
label,
|
|
35
|
+
evaluation = "primary",
|
|
36
|
+
children,
|
|
37
|
+
...props
|
|
38
|
+
}) => {
|
|
39
|
+
const c = vars.colors.informational[evaluation];
|
|
40
|
+
const labelId = React.useId();
|
|
41
|
+
const borderColor = c?.border?.default ?? "transparent";
|
|
42
|
+
return /* @__PURE__ */jsxs(Group, {
|
|
43
|
+
...props,
|
|
44
|
+
"aria-labelledby": label != null ? labelId : props["aria-labelledby"],
|
|
45
|
+
"data-scope": "group",
|
|
46
|
+
"data-part": "root",
|
|
47
|
+
"data-evaluation": evaluation,
|
|
48
|
+
style: {
|
|
49
|
+
boxSizing: "border-box",
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
gap: vars.spacing.gap.stack.sm,
|
|
53
|
+
padding: vars.spacing.inset.surface.md,
|
|
54
|
+
borderRadius: vars.radii.surface,
|
|
55
|
+
borderWidth: vars.border.outline.surface.width,
|
|
56
|
+
borderStyle: vars.border.outline.surface.style,
|
|
57
|
+
borderColor
|
|
58
|
+
},
|
|
59
|
+
children: [label != null && /* @__PURE__ */jsx("span", {
|
|
60
|
+
id: labelId,
|
|
61
|
+
"data-scope": "group",
|
|
62
|
+
"data-part": "label",
|
|
63
|
+
style: {
|
|
64
|
+
color: c?.text?.default,
|
|
65
|
+
...vars.text.title.sm
|
|
66
|
+
},
|
|
67
|
+
children: label
|
|
68
|
+
}), children]
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
Group$1.displayName = groupMeta.displayName;
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { Group$1 as Group, groupMeta };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
const require_glyphs = require('./glyphs.cjs');
|
|
3
|
+
let _ttoss_fsl_theme_vars = require("@ttoss/fsl-theme/vars");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _iconify_icon_react = require("@iconify-icon/react");
|
|
6
|
+
|
|
7
|
+
//#region src/components/Icon/Icon.tsx
|
|
8
|
+
/** Formal semantic identity — Icon (Structure entity, static glyph). */
|
|
9
|
+
var iconMeta = {
|
|
10
|
+
displayName: "Icon",
|
|
11
|
+
entity: "Structure",
|
|
12
|
+
structure: "icon"
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Renders a semantic glyph via the Iconify provider (ADR-005).
|
|
16
|
+
*
|
|
17
|
+
* Icon is named by intent and inherits its color from context
|
|
18
|
+
* (`currentColor`); only its size is a token. Glyphs are registered offline
|
|
19
|
+
* on first render (`ensureIconGlyphs`), so no network request is made.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <Icon intent="disclosure.expand" />
|
|
24
|
+
* <Icon intent="action.close" size="sm" label={closeLabel} />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
var Icon = ({
|
|
28
|
+
intent,
|
|
29
|
+
size = "md",
|
|
30
|
+
label
|
|
31
|
+
}) => {
|
|
32
|
+
require_glyphs.ensureIconGlyphs();
|
|
33
|
+
const decorative = label === void 0;
|
|
34
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(_iconify_icon_react.Icon, {
|
|
35
|
+
"data-scope": "icon",
|
|
36
|
+
"data-part": "icon",
|
|
37
|
+
icon: require_glyphs.iconifyName(intent),
|
|
38
|
+
noobserver: true,
|
|
39
|
+
"aria-hidden": decorative ? "true" : void 0,
|
|
40
|
+
"aria-label": label,
|
|
41
|
+
role: decorative ? void 0 : "img",
|
|
42
|
+
style: {
|
|
43
|
+
fontSize: _ttoss_fsl_theme_vars.vars.sizing.icon[size],
|
|
44
|
+
lineHeight: 1,
|
|
45
|
+
flexShrink: 0
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
Icon.displayName = iconMeta.displayName;
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.Icon = Icon;
|