@atelier-ui/react 0.1.12 → 0.2.0
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/CHANGELOG.md +26 -0
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.d.ts +29 -29
- package/src/index.js +29 -29
- package/src/index.js.map +1 -1
- package/src/lib/accordion/{llm-accordion.css → atl-accordion.css} +8 -8
- package/src/lib/accordion/{llm-accordion.d.ts → atl-accordion.d.ts} +12 -12
- package/src/lib/accordion/{llm-accordion.d.ts.map → atl-accordion.d.ts.map} +1 -1
- package/src/lib/accordion/{llm-accordion.js → atl-accordion.js} +9 -9
- package/src/lib/accordion/{llm-accordion.js.map → atl-accordion.js.map} +1 -1
- package/src/lib/alert/{llm-alert.css → atl-alert.css} +10 -10
- package/src/lib/alert/{llm-alert.d.ts → atl-alert.d.ts} +8 -8
- package/src/lib/alert/{llm-alert.d.ts.map → atl-alert.d.ts.map} +1 -1
- package/src/lib/alert/{llm-alert.js → atl-alert.js} +4 -4
- package/src/lib/alert/{llm-alert.js.map → atl-alert.js.map} +1 -1
- package/src/lib/avatar/{llm-avatar.css → atl-avatar.css} +20 -20
- package/src/lib/avatar/{llm-avatar.d.ts → atl-avatar.d.ts} +10 -10
- package/src/lib/avatar/{llm-avatar.d.ts.map → atl-avatar.d.ts.map} +1 -1
- package/src/lib/avatar/{llm-avatar.js → atl-avatar.js} +6 -6
- package/src/lib/avatar/{llm-avatar.js.map → atl-avatar.js.map} +1 -1
- package/src/lib/badge/{llm-badge.css → atl-badge.css} +9 -9
- package/src/lib/badge/atl-badge.d.ts +27 -0
- package/src/lib/badge/{llm-badge.d.ts.map → atl-badge.d.ts.map} +1 -1
- package/src/lib/badge/{llm-badge.js → atl-badge.js} +4 -4
- package/src/lib/badge/{llm-badge.js.map → atl-badge.js.map} +1 -1
- package/src/lib/breadcrumbs/{llm-breadcrumbs.css → atl-breadcrumbs.css} +11 -11
- package/src/lib/breadcrumbs/atl-breadcrumbs.d.ts +38 -0
- package/src/lib/breadcrumbs/{llm-breadcrumbs.d.ts.map → atl-breadcrumbs.d.ts.map} +1 -1
- package/src/lib/breadcrumbs/{llm-breadcrumbs.js → atl-breadcrumbs.js} +7 -7
- package/src/lib/breadcrumbs/{llm-breadcrumbs.js.map → atl-breadcrumbs.js.map} +1 -1
- package/src/lib/button/{llm-button.css → atl-button.css} +20 -20
- package/src/lib/button/{llm-button.d.ts → atl-button.d.ts} +7 -7
- package/src/lib/button/{llm-button.d.ts.map → atl-button.d.ts.map} +1 -1
- package/src/lib/button/{llm-button.js → atl-button.js} +4 -4
- package/src/lib/button/{llm-button.js.map → atl-button.js.map} +1 -1
- package/src/lib/card/{llm-card.css → atl-card.css} +20 -20
- package/src/lib/card/{llm-card.d.ts → atl-card.d.ts} +13 -13
- package/src/lib/card/{llm-card.d.ts.map → atl-card.d.ts.map} +1 -1
- package/src/lib/card/atl-card.js +30 -0
- package/src/lib/card/{llm-card.js.map → atl-card.js.map} +1 -1
- package/src/lib/chat/{llm-chat.css → atl-chat.css} +55 -55
- package/src/lib/chat/{llm-chat.d.ts → atl-chat.d.ts} +26 -26
- package/src/lib/chat/{llm-chat.d.ts.map → atl-chat.d.ts.map} +1 -1
- package/src/lib/chat/{llm-chat.js → atl-chat.js} +21 -21
- package/src/lib/chat/{llm-chat.js.map → atl-chat.js.map} +1 -1
- package/src/lib/checkbox/{llm-checkbox.css → atl-checkbox.css} +19 -19
- package/src/lib/checkbox/{llm-checkbox.d.ts → atl-checkbox.d.ts} +6 -6
- package/src/lib/checkbox/{llm-checkbox.d.ts.map → atl-checkbox.d.ts.map} +1 -1
- package/src/lib/checkbox/{llm-checkbox.js → atl-checkbox.js} +4 -4
- package/src/lib/checkbox/{llm-checkbox.js.map → atl-checkbox.js.map} +1 -1
- package/src/lib/code-block/{llm-code-block.css → atl-code-block.css} +2 -2
- package/src/lib/code-block/{llm-code-block.d.ts → atl-code-block.d.ts} +4 -4
- package/src/lib/code-block/{llm-code-block.d.ts.map → atl-code-block.d.ts.map} +1 -1
- package/src/lib/code-block/{llm-code-block.js → atl-code-block.js} +4 -4
- package/src/lib/code-block/{llm-code-block.js.map → atl-code-block.js.map} +1 -1
- package/src/lib/combobox/{llm-combobox.css → atl-combobox.css} +24 -24
- package/src/lib/combobox/{llm-combobox.d.ts → atl-combobox.d.ts} +7 -7
- package/src/lib/combobox/{llm-combobox.d.ts.map → atl-combobox.d.ts.map} +1 -1
- package/src/lib/combobox/{llm-combobox.js → atl-combobox.js} +8 -8
- package/src/lib/combobox/{llm-combobox.js.map → atl-combobox.js.map} +1 -1
- package/src/lib/dialog/{llm-dialog.css → atl-dialog.css} +18 -18
- package/src/lib/dialog/{llm-dialog.d.ts → atl-dialog.d.ts} +12 -12
- package/src/lib/dialog/{llm-dialog.d.ts.map → atl-dialog.d.ts.map} +1 -1
- package/src/lib/dialog/{llm-dialog.js → atl-dialog.js} +13 -13
- package/src/lib/dialog/{llm-dialog.js.map → atl-dialog.js.map} +1 -1
- package/src/lib/drawer/{llm-drawer.css → atl-drawer.css} +35 -35
- package/src/lib/drawer/{llm-drawer.d.ts → atl-drawer.d.ts} +12 -12
- package/src/lib/drawer/{llm-drawer.d.ts.map → atl-drawer.d.ts.map} +1 -1
- package/src/lib/drawer/{llm-drawer.js → atl-drawer.js} +13 -13
- package/src/lib/drawer/{llm-drawer.js.map → atl-drawer.js.map} +1 -1
- package/src/lib/icon/{llm-icon.css → atl-icon.css} +4 -4
- package/src/lib/icon/atl-icon.d.ts +24 -0
- package/src/lib/icon/{llm-icon.d.ts.map → atl-icon.d.ts.map} +1 -1
- package/src/lib/icon/{llm-icon.js → atl-icon.js} +5 -5
- package/src/lib/icon/{llm-icon.js.map → atl-icon.js.map} +1 -1
- package/src/lib/input/{llm-input.css → atl-input.css} +14 -14
- package/src/lib/input/{llm-input.d.ts → atl-input.d.ts} +6 -6
- package/src/lib/input/{llm-input.d.ts.map → atl-input.d.ts.map} +1 -1
- package/src/lib/input/{llm-input.js → atl-input.js} +4 -4
- package/src/lib/input/{llm-input.js.map → atl-input.js.map} +1 -1
- package/src/lib/menu/{llm-menu.css → atl-menu.css} +11 -11
- package/src/lib/menu/{llm-menu.d.ts → atl-menu.d.ts} +13 -13
- package/src/lib/menu/{llm-menu.d.ts.map → atl-menu.d.ts.map} +1 -1
- package/src/lib/menu/{llm-menu.js → atl-menu.js} +10 -10
- package/src/lib/menu/{llm-menu.js.map → atl-menu.js.map} +1 -1
- package/src/lib/pagination/{llm-pagination.css → atl-pagination.css} +1 -1
- package/src/lib/pagination/{llm-pagination.d.ts → atl-pagination.d.ts} +6 -6
- package/src/lib/pagination/{llm-pagination.d.ts.map → atl-pagination.d.ts.map} +1 -1
- package/src/lib/pagination/{llm-pagination.js → atl-pagination.js} +4 -4
- package/src/lib/pagination/{llm-pagination.js.map → atl-pagination.js.map} +1 -1
- package/src/lib/progress/{llm-progress.css → atl-progress.css} +9 -9
- package/src/lib/progress/{llm-progress.d.ts → atl-progress.d.ts} +6 -6
- package/src/lib/progress/{llm-progress.d.ts.map → atl-progress.d.ts.map} +1 -1
- package/src/lib/progress/{llm-progress.js → atl-progress.js} +4 -4
- package/src/lib/progress/{llm-progress.js.map → atl-progress.js.map} +1 -1
- package/src/lib/radio/{llm-radio.css → atl-radio.css} +11 -11
- package/src/lib/radio/{llm-radio.d.ts → atl-radio.d.ts} +7 -7
- package/src/lib/radio/{llm-radio.d.ts.map → atl-radio.d.ts.map} +1 -1
- package/src/lib/radio/{llm-radio.js → atl-radio.js} +6 -6
- package/src/lib/radio/{llm-radio.js.map → atl-radio.js.map} +1 -1
- package/src/lib/radio-group/{llm-radio-group.css → atl-radio-group.css} +6 -6
- package/src/lib/radio-group/{llm-radio-group.d.ts → atl-radio-group.d.ts} +6 -6
- package/src/lib/radio-group/{llm-radio-group.d.ts.map → atl-radio-group.d.ts.map} +1 -1
- package/src/lib/radio-group/{llm-radio-group.js → atl-radio-group.js} +4 -4
- package/src/lib/radio-group/{llm-radio-group.js.map → atl-radio-group.js.map} +1 -1
- package/src/lib/select/{llm-select.css → atl-select.css} +11 -11
- package/src/lib/select/{llm-select.d.ts → atl-select.d.ts} +10 -10
- package/src/lib/select/{llm-select.d.ts.map → atl-select.d.ts.map} +1 -1
- package/src/lib/select/{llm-select.js → atl-select.js} +6 -6
- package/src/lib/select/{llm-select.js.map → atl-select.js.map} +1 -1
- package/src/lib/skeleton/{llm-skeleton.css → atl-skeleton.css} +6 -6
- package/src/lib/skeleton/{llm-skeleton.d.ts → atl-skeleton.d.ts} +6 -6
- package/src/lib/skeleton/{llm-skeleton.d.ts.map → atl-skeleton.d.ts.map} +1 -1
- package/src/lib/skeleton/{llm-skeleton.js → atl-skeleton.js} +4 -4
- package/src/lib/skeleton/{llm-skeleton.js.map → atl-skeleton.js.map} +1 -1
- package/src/lib/spec.d.ts +120 -120
- package/src/lib/spec.js.map +1 -1
- package/src/lib/stepper/{llm-stepper.css → atl-stepper.css} +5 -5
- package/src/lib/stepper/{llm-stepper.d.ts → atl-stepper.d.ts} +9 -9
- package/src/lib/stepper/{llm-stepper.d.ts.map → atl-stepper.d.ts.map} +1 -1
- package/src/lib/stepper/{llm-stepper.js → atl-stepper.js} +11 -11
- package/src/lib/stepper/{llm-stepper.js.map → atl-stepper.js.map} +1 -1
- package/src/lib/table/{llm-table.css → atl-table.css} +30 -30
- package/src/lib/table/atl-table.d.ts +40 -0
- package/src/lib/table/{llm-table.d.ts.map → atl-table.d.ts.map} +1 -1
- package/src/lib/table/{llm-table.js → atl-table.js} +14 -14
- package/src/lib/table/{llm-table.js.map → atl-table.js.map} +1 -1
- package/src/lib/tabs/{llm-tabs.css → atl-tabs.css} +17 -17
- package/src/lib/tabs/{llm-tabs.d.ts → atl-tabs.d.ts} +12 -12
- package/src/lib/tabs/{llm-tabs.d.ts.map → atl-tabs.d.ts.map} +1 -1
- package/src/lib/tabs/{llm-tabs.js → atl-tabs.js} +11 -11
- package/src/lib/tabs/{llm-tabs.js.map → atl-tabs.js.map} +1 -1
- package/src/lib/textarea/{llm-textarea.css → atl-textarea.css} +15 -15
- package/src/lib/textarea/{llm-textarea.d.ts → atl-textarea.d.ts} +6 -6
- package/src/lib/textarea/{llm-textarea.d.ts.map → atl-textarea.d.ts.map} +1 -1
- package/src/lib/textarea/{llm-textarea.js → atl-textarea.js} +4 -4
- package/src/lib/textarea/{llm-textarea.js.map → atl-textarea.js.map} +1 -1
- package/src/lib/toast/{llm-toast.css → atl-toast.css} +16 -16
- package/src/lib/toast/atl-toast.d.ts +54 -0
- package/src/lib/toast/{llm-toast.d.ts.map → atl-toast.d.ts.map} +1 -1
- package/src/lib/toast/{llm-toast.js → atl-toast.js} +12 -12
- package/src/lib/toast/{llm-toast.js.map → atl-toast.js.map} +1 -1
- package/src/lib/toggle/{llm-toggle.css → atl-toggle.css} +16 -16
- package/src/lib/toggle/{llm-toggle.d.ts → atl-toggle.d.ts} +6 -6
- package/src/lib/toggle/{llm-toggle.d.ts.map → atl-toggle.d.ts.map} +1 -1
- package/src/lib/toggle/{llm-toggle.js → atl-toggle.js} +4 -4
- package/src/lib/toggle/{llm-toggle.js.map → atl-toggle.js.map} +1 -1
- package/src/lib/tooltip/{llm-tooltip.css → atl-tooltip.css} +12 -12
- package/src/lib/tooltip/atl-tooltip.d.ts +17 -0
- package/src/lib/tooltip/{llm-tooltip.d.ts.map → atl-tooltip.d.ts.map} +1 -1
- package/src/lib/tooltip/{llm-tooltip.js → atl-tooltip.js} +7 -7
- package/src/lib/tooltip/{llm-tooltip.js.map → atl-tooltip.js.map} +1 -1
- package/src/lib/badge/llm-badge.d.ts +0 -27
- package/src/lib/breadcrumbs/llm-breadcrumbs.d.ts +0 -38
- package/src/lib/card/llm-card.js +0 -30
- package/src/lib/icon/llm-icon.d.ts +0 -24
- package/src/lib/table/llm-table.d.ts +0 -40
- package/src/lib/toast/llm-toast.d.ts +0 -54
- package/src/lib/tooltip/llm-tooltip.d.ts +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"atl-toast.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/toast/atl-toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,GAEP,MAAM,OAAO,CAAC;AAKf,OAAO,iBAAiB,CAAC;AAiBzB,MAAM,YAAY,GAAG,aAAa,CAAoB;IACpD,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE;IACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS;IACxB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS;IACtB,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,QAAQ,EAA2B;IACpE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAc,EAAE,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,MAAM,CAA6C,IAAI,GAAG,EAAE,CAAC,CAAC;IAChF,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE;QACzC,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACxC,IAAI,KAAK,EAAE,CAAC;YACV,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,IAAI,GAAG,WAAW,CACtB,CAAC,OAAe,EAAE,UAA2B,EA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,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,aAElB,eAAM,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,GAAG,EACtC,eAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,GAAG,IAClC,GACC,CACV,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n useState,\n useCallback,\n useRef,\n ReactNode,\n} from 'react';\nimport type {\n AtlToastOptions,\n AtlToastContainerPosition,\n} from '../spec';\nimport './atl-toast.css';\n\n/**\n * Internal data structure for a toast message.\n */\nexport interface ToastData extends Required<AtlToastOptions> {\n id: string;\n message: string;\n}\n\ninterface ToastContextValue {\n show: (message: string, options?: AtlToastOptions) => string;\n dismiss: (id: string) => void;\n clear: () => void;\n toasts: ToastData[];\n}\n\nconst ToastContext = createContext<ToastContextValue>({\n show: () => '',\n dismiss: () => undefined,\n clear: () => undefined,\n toasts: [],\n});\n\n/**\n * Context provider that manages the toast state.\n */\nexport function AtlToastProvider({ children }: { children: ReactNode }) {\n const [toasts, setToasts] = useState<ToastData[]>([]);\n const timersRef = useRef<Map<string, ReturnType<typeof setTimeout>>>(new Map());\n const toastId = useRef(0);\n\n const dismiss = useCallback((id: string) => {\n const timer = timersRef.current.get(id);\n if (timer) {\n clearTimeout(timer);\n timersRef.current.delete(id);\n }\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const show = useCallback(\n (message: string, options: AtlToastOptions = {}): string => {\n const id = `atl-toast-${toastId.current++}`;\n const toast: ToastData = {\n id,\n message,\n variant: options.variant ?? 'default',\n duration: options.duration ?? 5000,\n dismissible: options.dismissible ?? true,\n };\n setToasts((prev) => [...prev, toast]);\n if (toast.duration > 0) {\n const timer = setTimeout(() => dismiss(id), toast.duration);\n timersRef.current.set(id, timer);\n }\n return id;\n },\n [dismiss]\n );\n\n const clear = useCallback(() => {\n for (const timer of timersRef.current.values()) clearTimeout(timer);\n timersRef.current.clear();\n setToasts([]);\n }, []);\n\n return (\n <ToastContext.Provider value={{ show, dismiss, clear, toasts }}>\n {children}\n </ToastContext.Provider>\n );\n}\n\n/** Access toast actions: show, dismiss, clear. Must be inside AtlToastProvider. */\nexport function useAtlToast() {\n const ctx = useContext(ToastContext);\n return { show: ctx.show, dismiss: ctx.dismiss, clear: ctx.clear };\n}\n\n/**\n * Properties for the AtlToastContainer component.\n */\nexport interface AtlToastContainerProps {\n /**\n * Position of the toast container in the viewport.\n */\n position?: AtlToastContainerPosition;\n}\n\n/**\n * Renders the toast stack at a fixed viewport position.\n * Must be placed inside AtlToastProvider.\n */\nexport function AtlToastContainer({ position = 'bottom-right' }: AtlToastContainerProps) {\n const { toasts, dismiss } = useContext(ToastContext);\n const classes = `atl-toast-container position-${position}`;\n\n return (\n <div className={classes} aria-live=\"polite\" role=\"status\">\n {toasts.map((toast) => (\n <AtlToastItem key={toast.id} data={toast} onDismiss={dismiss} />\n ))}\n </div>\n );\n}\n\n/**\n * Properties for the AtlToastItem component.\n */\nexport interface AtlToastItemProps {\n /**\n * The toast data to display.\n */\n data: ToastData;\n /**\n * Callback fired when the toast is dismissed.\n */\n onDismiss: (id: string) => void;\n}\n\n/**\n * An individual toast notification item.\n */\nexport function AtlToastItem({ data, onDismiss }: AtlToastItemProps) {\n const classes = `atl-toast variant-${data.variant}`;\n return (\n <div className={classes} role=\"status\">\n <span className=\"message\">{data.message}</span>\n {data.dismissible && (\n <button\n className=\"dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={() => onDismiss(data.id)}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
.atl-toggle {
|
|
2
2
|
display: block;
|
|
3
3
|
font-family: var(--ui-font-family);
|
|
4
4
|
font-size: var(--ui-font-size-md);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
.atl-toggle label {
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
gap: var(--ui-spacing-3);
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/* Hide native checkbox visually but keep it accessible */
|
|
19
|
-
.
|
|
19
|
+
.atl-toggle input[type='checkbox'] {
|
|
20
20
|
position: absolute;
|
|
21
21
|
width: 1px;
|
|
22
22
|
height: 1px;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* Track — pill-shaped container */
|
|
32
|
-
.
|
|
32
|
+
.atl-toggle .track {
|
|
33
33
|
position: relative;
|
|
34
34
|
display: inline-flex;
|
|
35
35
|
align-items: center;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/* Thumb — circular slider */
|
|
49
|
-
.
|
|
49
|
+
.atl-toggle .thumb {
|
|
50
50
|
position: absolute;
|
|
51
51
|
left: 0.125rem;
|
|
52
52
|
width: 1.125rem;
|
|
@@ -59,58 +59,58 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/* Hover state */
|
|
62
|
-
.
|
|
62
|
+
.atl-toggle label:hover:not(:has(input:disabled)) .track {
|
|
63
63
|
border-color: var(--ui-color-primary);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/* Focus ring on track when native input is focused */
|
|
67
|
-
.
|
|
67
|
+
.atl-toggle input[type='checkbox']:focus-visible + .track {
|
|
68
68
|
box-shadow: var(--ui-focus-ring);
|
|
69
69
|
border-color: var(--ui-color-primary);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/* Checked state — track */
|
|
73
|
-
.
|
|
73
|
+
.atl-toggle.is-checked .track {
|
|
74
74
|
background-color: var(--ui-color-primary);
|
|
75
75
|
border-color: var(--ui-color-primary);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/* Checked state — thumb slides right */
|
|
79
|
-
.
|
|
79
|
+
.atl-toggle.is-checked .thumb {
|
|
80
80
|
transform: translateX(1.25rem);
|
|
81
81
|
background-color: var(--ui-color-text-on-primary);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* Invalid state — track border */
|
|
85
|
-
.
|
|
85
|
+
.atl-toggle.is-invalid .track {
|
|
86
86
|
border-color: var(--ui-color-input-border-invalid);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.
|
|
89
|
+
.atl-toggle.is-invalid input[type='checkbox']:focus-visible + .track {
|
|
90
90
|
border-color: var(--ui-color-input-border-invalid);
|
|
91
91
|
box-shadow: 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/* Disabled state */
|
|
95
|
-
.
|
|
95
|
+
.atl-toggle.is-disabled {
|
|
96
96
|
opacity: var(--ui-opacity-disabled);
|
|
97
97
|
cursor: not-allowed;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
.atl-toggle.is-disabled label {
|
|
101
101
|
cursor: not-allowed;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
.atl-toggle.is-disabled .track {
|
|
105
105
|
cursor: not-allowed;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* Error messages */
|
|
109
|
-
.
|
|
109
|
+
.atl-toggle .errors {
|
|
110
110
|
margin-top: var(--ui-spacing-2);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.atl-toggle .error-message {
|
|
114
114
|
margin: 0;
|
|
115
115
|
font-size: var(--ui-font-size-sm);
|
|
116
116
|
color: var(--ui-color-error-text);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
import './
|
|
2
|
+
import type { AtlToggleSpec } from '../spec';
|
|
3
|
+
import './atl-toggle.css';
|
|
4
4
|
/**
|
|
5
|
-
* Properties for the
|
|
5
|
+
* Properties for the AtlToggle component.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface AtlToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'readOnly' | 'value'>, AtlToggleSpec {
|
|
8
8
|
/**
|
|
9
9
|
* Whether the toggle is read-only.
|
|
10
10
|
*/
|
|
@@ -25,5 +25,5 @@ export interface LlmToggleProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
25
25
|
/**
|
|
26
26
|
* A toggle switch component for binary choices, supporting validation and custom labels.
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
29
|
-
//# sourceMappingURL=
|
|
28
|
+
export declare function AtlToggle({ checked, onCheckedChange, invalid, errors, disabled, readOnly: reactReadOnly, readonly: specReadOnly, required, children, className, id, name, ...rest }: AtlToggleProps): import("react").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=atl-toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"atl-toggle.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/toggle/atl-toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,EACzG,aAAa;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAe,EACf,eAAe,EACf,OAAe,EACf,MAAW,EACX,QAAgB,EAChB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EACtB,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,EAAE,EACF,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,cAAc,+BAmDhB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from 'react';
|
|
3
|
-
import './
|
|
3
|
+
import './atl-toggle.css';
|
|
4
4
|
/**
|
|
5
5
|
* A toggle switch component for binary choices, supporting validation and custom labels.
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function AtlToggle({ checked = false, onCheckedChange, invalid = false, errors = [], disabled = false, readOnly: reactReadOnly, readonly: specReadOnly, required = false, children, className, id, name, ...rest }) {
|
|
8
8
|
const readOnly = reactReadOnly ?? specReadOnly ?? false;
|
|
9
9
|
const generatedId = useId();
|
|
10
10
|
const inputId = id || `toggle-${generatedId}`;
|
|
11
11
|
const errorId = `${inputId}-errors`;
|
|
12
12
|
const classes = [
|
|
13
|
-
'
|
|
13
|
+
'atl-toggle',
|
|
14
14
|
checked && 'is-checked',
|
|
15
15
|
invalid && 'is-invalid',
|
|
16
16
|
disabled && 'is-disabled',
|
|
@@ -20,4 +20,4 @@ export function LlmToggle({ checked = false, onCheckedChange, invalid = false, e
|
|
|
20
20
|
.join(' ');
|
|
21
21
|
return (_jsxs("div", { className: classes, children: [_jsxs("label", { htmlFor: inputId, children: [_jsx("input", { type: "checkbox", role: "switch", id: inputId, checked: checked, onChange: (e) => onCheckedChange?.(e.target.checked), disabled: disabled, readOnly: readOnly, required: required, "aria-checked": checked, "aria-invalid": invalid || undefined, "aria-required": required || undefined, "aria-describedby": errors.length > 0 ? errorId : undefined, name: name, ...rest }), _jsx("span", { className: "track", "aria-hidden": "true", children: _jsx("span", { className: "thumb" }) }), children] }), errors.length > 0 && (_jsx("div", { className: "errors", id: errorId, "aria-live": "polite", children: errors.map((err, i) => (_jsx("p", { className: "error-message", children: err }, i))) }))] }));
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=atl-toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"atl-toggle.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/toggle/atl-toggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkC,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,kBAAkB,CAAC;AA0B1B;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,OAAO,GAAG,KAAK,EACf,eAAe,EACf,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,EAAE,EACX,QAAQ,GAAG,KAAK,EAChB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EACtB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,SAAS,EACT,EAAE,EACF,IAAI,EACJ,GAAG,IAAI,EACQ;IACf,MAAM,QAAQ,GAAG,aAAa,IAAI,YAAY,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E,CAAC,CAEL,CACL,CAAC,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { InputHTMLAttributes, ReactNode, useId } from 'react';\nimport type { AtlToggleSpec } from '../spec';\nimport './atl-toggle.css';\n\n/**\n * Properties for the AtlToggle component.\n */\nexport interface AtlToggleProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'readOnly' | 'value'>,\n AtlToggleSpec {\n /**\n * Whether the toggle is read-only.\n */\n readOnly?: boolean;\n /**\n * Callback fired when the checked state changes.\n */\n onCheckedChange?: (checked: boolean) => void;\n /**\n * List of error messages to display.\n */\n errors?: string[];\n /**\n * Optional content to display alongside the toggle.\n */\n children?: ReactNode;\n}\n\n/**\n * A toggle switch component for binary choices, supporting validation and custom labels.\n */\nexport function AtlToggle({\n checked = false,\n onCheckedChange,\n invalid = false,\n errors = [],\n disabled = false,\n readOnly: reactReadOnly,\n readonly: specReadOnly,\n required = false,\n children,\n className,\n id,\n name,\n ...rest\n}: AtlToggleProps) {\n const readOnly = reactReadOnly ?? specReadOnly ?? false;\n const generatedId = useId();\n const inputId = id || `toggle-${generatedId}`;\n const errorId = `${inputId}-errors`;\n\n const classes = [\n 'atl-toggle',\n checked && 'is-checked',\n invalid && 'is-invalid',\n disabled && 'is-disabled',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={classes}>\n <label htmlFor={inputId}>\n <input\n type=\"checkbox\"\n role=\"switch\"\n id={inputId}\n checked={checked}\n onChange={(e) => onCheckedChange?.(e.target.checked)}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n aria-checked={checked}\n aria-invalid={invalid || undefined}\n aria-required={required || undefined}\n aria-describedby={errors.length > 0 ? errorId : undefined}\n name={name}\n {...rest}\n />\n <span className=\"track\" aria-hidden=\"true\">\n <span className=\"thumb\" />\n </span>\n {children}\n </label>\n {errors.length > 0 && (\n <div className=\"errors\" id={errorId} aria-live=\"polite\">\n {errors.map((err, i) => (\n <p key={i} className=\"error-message\">\n {err}\n </p>\n ))}\n </div>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* Tooltip wrapper — inline container */
|
|
2
|
-
.
|
|
2
|
+
.atl-tooltip-wrapper {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/* Tooltip content */
|
|
8
|
-
.
|
|
8
|
+
.atl-tooltip {
|
|
9
9
|
position: absolute;
|
|
10
10
|
z-index: var(--ui-z-tooltip, 200);
|
|
11
11
|
display: block;
|
|
@@ -23,35 +23,35 @@
|
|
|
23
23
|
white-space: nowrap;
|
|
24
24
|
|
|
25
25
|
/* Entry animation */
|
|
26
|
-
animation:
|
|
26
|
+
animation: atl-tooltip-enter var(--ui-duration-fast) var(--ui-ease-out) forwards;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* Positioning */
|
|
30
|
-
.
|
|
30
|
+
.atl-tooltip.position-above {
|
|
31
31
|
bottom: calc(100% + 8px);
|
|
32
32
|
left: 50%;
|
|
33
33
|
transform: translateX(-50%);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.atl-tooltip.position-below {
|
|
37
37
|
top: calc(100% + 8px);
|
|
38
38
|
left: 50%;
|
|
39
39
|
transform: translateX(-50%);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.atl-tooltip.position-left {
|
|
43
43
|
right: calc(100% + 8px);
|
|
44
44
|
top: 50%;
|
|
45
45
|
transform: translateY(-50%);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.atl-tooltip.position-right {
|
|
49
49
|
left: calc(100% + 8px);
|
|
50
50
|
top: 50%;
|
|
51
51
|
transform: translateY(-50%);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
@keyframes
|
|
54
|
+
@keyframes atl-tooltip-enter {
|
|
55
55
|
from {
|
|
56
56
|
opacity: 0;
|
|
57
57
|
transform: scale(0.95) translateX(-50%);
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/* Left/right don't need translateX in animation */
|
|
66
|
-
.
|
|
67
|
-
.
|
|
68
|
-
animation:
|
|
66
|
+
.atl-tooltip.position-left,
|
|
67
|
+
.atl-tooltip.position-right {
|
|
68
|
+
animation: atl-tooltip-enter-side var(--ui-duration-fast) var(--ui-ease-out) forwards;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
@keyframes
|
|
71
|
+
@keyframes atl-tooltip-enter-side {
|
|
72
72
|
from {
|
|
73
73
|
opacity: 0;
|
|
74
74
|
transform: scale(0.95) translateY(-50%);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { AtlTooltipSpec } from '../spec';
|
|
3
|
+
import './atl-tooltip.css';
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the AtlTooltip component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AtlTooltipProps extends AtlTooltipSpec {
|
|
8
|
+
/**
|
|
9
|
+
* The content to trigger the tooltip.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A tooltip component that displays additional information when the trigger is hovered or focused.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AtlTooltip({ atlTooltip, atlTooltipPosition, atlTooltipDisabled, atlTooltipShowDelay, atlTooltipHideDelay, children, }: AtlTooltipProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=atl-tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"atl-tooltip.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/tooltip/atl-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAS,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,kBAA4B,EAC5B,kBAA0B,EAC1B,mBAAyB,EACzB,mBAAuB,EACvB,QAAQ,GACT,EAAE,eAAe,+BAiFjB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect, useId } from 'react';
|
|
3
|
-
import './
|
|
3
|
+
import './atl-tooltip.css';
|
|
4
4
|
/**
|
|
5
5
|
* A tooltip component that displays additional information when the trigger is hovered or focused.
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function AtlTooltip({ atlTooltip, atlTooltipPosition = 'above', atlTooltipDisabled = false, atlTooltipShowDelay = 300, atlTooltipHideDelay = 0, children, }) {
|
|
8
8
|
const [visible, setVisible] = useState(false);
|
|
9
9
|
const showTimer = useRef(null);
|
|
10
10
|
const hideTimer = useRef(null);
|
|
@@ -12,7 +12,7 @@ export function LlmTooltip({ llmTooltip, llmTooltipPosition = 'above', llmToolti
|
|
|
12
12
|
const id = useId();
|
|
13
13
|
const tooltipId = `tooltip-${id}`;
|
|
14
14
|
const show = () => {
|
|
15
|
-
if (
|
|
15
|
+
if (atlTooltipDisabled || !atlTooltip)
|
|
16
16
|
return;
|
|
17
17
|
if (hideTimer.current) {
|
|
18
18
|
clearTimeout(hideTimer.current);
|
|
@@ -22,7 +22,7 @@ export function LlmTooltip({ llmTooltip, llmTooltipPosition = 'above', llmToolti
|
|
|
22
22
|
showTimer.current = setTimeout(() => {
|
|
23
23
|
showTimer.current = null;
|
|
24
24
|
setVisible(true);
|
|
25
|
-
},
|
|
25
|
+
}, atlTooltipShowDelay);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
const hide = () => {
|
|
@@ -33,7 +33,7 @@ export function LlmTooltip({ llmTooltip, llmTooltipPosition = 'above', llmToolti
|
|
|
33
33
|
hideTimer.current = setTimeout(() => {
|
|
34
34
|
hideTimer.current = null;
|
|
35
35
|
setVisible(false);
|
|
36
|
-
},
|
|
36
|
+
}, atlTooltipHideDelay);
|
|
37
37
|
};
|
|
38
38
|
// Set aria-describedby on the child element
|
|
39
39
|
useEffect(() => {
|
|
@@ -63,6 +63,6 @@ export function LlmTooltip({ llmTooltip, llmTooltipPosition = 'above', llmToolti
|
|
|
63
63
|
clearTimeout(hideTimer.current);
|
|
64
64
|
};
|
|
65
65
|
}, []);
|
|
66
|
-
return (_jsxs("span", { ref: wrapperRef, className: "
|
|
66
|
+
return (_jsxs("span", { ref: wrapperRef, className: "atl-tooltip-wrapper", onMouseEnter: show, onMouseLeave: hide, onFocus: show, onBlur: hide, children: [children, visible && !atlTooltipDisabled && atlTooltip && (_jsx("div", { id: tooltipId, role: "tooltip", className: `atl-tooltip position-${atlTooltipPosition}`, children: atlTooltip }))] }));
|
|
67
67
|
}
|
|
68
|
-
//# sourceMappingURL=
|
|
68
|
+
//# sourceMappingURL=atl-tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"atl-tooltip.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/tooltip/atl-tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAa,KAAK,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,mBAAmB,CAAC;AAY3B;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,UAAU,EACV,kBAAkB,GAAG,OAAO,EAC5B,kBAAkB,GAAG,KAAK,EAC1B,mBAAmB,GAAG,GAAG,EACzB,mBAAmB,G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AAI,CAC/C,cACE,EAAE,EAAE,SAAS,EACb,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,wBAAwB,kBAAkB,EAAE,YAEtD,UAAU,GACP,CACP,IACI,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useRef, useEffect, ReactNode, useId } from 'react';\nimport type { AtlTooltipSpec } from '../spec';\nimport './atl-tooltip.css';\n\n/**\n * Properties for the AtlTooltip component.\n */\nexport interface AtlTooltipProps extends AtlTooltipSpec {\n /**\n * The content to trigger the tooltip.\n */\n children: ReactNode;\n}\n\n/**\n * A tooltip component that displays additional information when the trigger is hovered or focused.\n */\nexport function AtlTooltip({\n atlTooltip,\n atlTooltipPosition = 'above',\n atlTooltipDisabled = false,\n atlTooltipShowDelay = 300,\n atlTooltipHideDelay = 0,\n children,\n}: AtlTooltipProps) {\n const [visible, setVisible] = useState(false);\n const showTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const hideTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const wrapperRef = useRef<HTMLSpanElement>(null);\n const id = useId();\n const tooltipId = `tooltip-${id}`;\n\n const show = () => {\n if (atlTooltipDisabled || !atlTooltip) return;\n if (hideTimer.current) {\n clearTimeout(hideTimer.current);\n hideTimer.current = null;\n }\n if (!visible) {\n showTimer.current = setTimeout(() => {\n showTimer.current = null;\n setVisible(true);\n }, atlTooltipShowDelay);\n }\n };\n\n const hide = () => {\n if (showTimer.current) {\n clearTimeout(showTimer.current);\n showTimer.current = null;\n }\n hideTimer.current = setTimeout(() => {\n hideTimer.current = null;\n setVisible(false);\n }, atlTooltipHideDelay);\n };\n\n // Set aria-describedby on the child element\n useEffect(() => {\n const el = wrapperRef.current?.firstElementChild as HTMLElement | null;\n if (el && visible) {\n el.setAttribute('aria-describedby', tooltipId);\n } else if (el) {\n el.removeAttribute('aria-describedby');\n }\n }, [visible, tooltipId]);\n\n // Handle Escape key to dismiss\n useEffect(() => {\n const keyHandler = (e: globalThis.KeyboardEvent) => {\n if (e.key === 'Escape') setVisible(false);\n };\n document.addEventListener('keydown', keyHandler);\n return () => document.removeEventListener('keydown', keyHandler);\n }, []);\n\n // Cleanup timers on unmount\n useEffect(() => {\n return () => {\n if (showTimer.current) clearTimeout(showTimer.current);\n if (hideTimer.current) clearTimeout(hideTimer.current);\n };\n }, []);\n\n return (\n <span\n ref={wrapperRef}\n className=\"atl-tooltip-wrapper\"\n onMouseEnter={show}\n onMouseLeave={hide}\n onFocus={show}\n onBlur={hide}\n >\n {children}\n {visible && !atlTooltipDisabled && atlTooltip && (\n <div\n id={tooltipId}\n role=\"tooltip\"\n className={`atl-tooltip position-${atlTooltipPosition}`}\n >\n {atlTooltip}\n </div>\n )}\n </span>\n );\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type { LlmBadgeSpec } from '../spec';
|
|
3
|
-
import './llm-badge.css';
|
|
4
|
-
type LlmBadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
5
|
-
/**
|
|
6
|
-
* Properties for the LlmBadge component.
|
|
7
|
-
*/
|
|
8
|
-
export interface LlmBadgeProps extends HTMLAttributes<HTMLSpanElement>, LlmBadgeSpec {
|
|
9
|
-
/**
|
|
10
|
-
* The visual style variant of the badge.
|
|
11
|
-
*/
|
|
12
|
-
variant?: LlmBadgeVariant;
|
|
13
|
-
/**
|
|
14
|
-
* The size of the badge.
|
|
15
|
-
*/
|
|
16
|
-
size?: 'sm' | 'md';
|
|
17
|
-
/**
|
|
18
|
-
* The content to be rendered inside the badge.
|
|
19
|
-
*/
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A badge component for displaying small amounts of information or status.
|
|
24
|
-
*/
|
|
25
|
-
export declare function LlmBadge({ variant, size, children, className, ...rest }: LlmBadgeProps): import("react").JSX.Element;
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=llm-badge.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
|
|
2
|
-
import type { LlmBreadcrumbsSpec, LlmBreadcrumbItemSpec } from '../spec';
|
|
3
|
-
import './llm-breadcrumbs.css';
|
|
4
|
-
/**
|
|
5
|
-
* Properties for the LlmBreadcrumbs component.
|
|
6
|
-
*/
|
|
7
|
-
export interface LlmBreadcrumbsProps extends HTMLAttributes<HTMLElement>, LlmBreadcrumbsSpec {
|
|
8
|
-
/**
|
|
9
|
-
* The breadcrumb items to be rendered.
|
|
10
|
-
*/
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A breadcrumbs component for displaying a navigation trail.
|
|
15
|
-
*/
|
|
16
|
-
export declare function LlmBreadcrumbs({ children, separator, className, style, ...rest }: LlmBreadcrumbsProps): import("react").JSX.Element;
|
|
17
|
-
/**
|
|
18
|
-
* Properties for the LlmBreadcrumbItem component.
|
|
19
|
-
*/
|
|
20
|
-
export interface LlmBreadcrumbItemProps extends AnchorHTMLAttributes<HTMLAnchorElement>, LlmBreadcrumbItemSpec {
|
|
21
|
-
/**
|
|
22
|
-
* The URL the breadcrumb points to.
|
|
23
|
-
*/
|
|
24
|
-
href?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Whether this is the current page.
|
|
27
|
-
*/
|
|
28
|
-
current?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The content to be rendered inside the breadcrumb item.
|
|
31
|
-
*/
|
|
32
|
-
children?: ReactNode;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* An individual breadcrumb item.
|
|
36
|
-
*/
|
|
37
|
-
export declare function LlmBreadcrumbItem({ href, current, children, className, ...rest }: LlmBreadcrumbItemProps): import("react").JSX.Element;
|
|
38
|
-
//# sourceMappingURL=llm-breadcrumbs.d.ts.map
|
package/src/lib/card/llm-card.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import './llm-card.css';
|
|
3
|
-
/**
|
|
4
|
-
* A card component for grouping related content.
|
|
5
|
-
*/
|
|
6
|
-
export function LlmCard({ variant = 'elevated', padding = 'md', children, className, ...rest }) {
|
|
7
|
-
const classes = ['llm-card', `variant-${variant}`, `padding-${padding}`, className]
|
|
8
|
-
.filter(Boolean)
|
|
9
|
-
.join(' ');
|
|
10
|
-
return (_jsx("div", { className: classes, ...rest, children: children }));
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The header component for an LlmCard.
|
|
14
|
-
*/
|
|
15
|
-
export function LlmCardHeader({ children, className, ...rest }) {
|
|
16
|
-
return (_jsx("div", { className: ['llm-card-header', className].filter(Boolean).join(' '), ...rest, children: children }));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The main content component for an LlmCard.
|
|
20
|
-
*/
|
|
21
|
-
export function LlmCardContent({ children, className, ...rest }) {
|
|
22
|
-
return (_jsx("div", { className: ['llm-card-content', className].filter(Boolean).join(' '), ...rest, children: children }));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The footer component for an LlmCard.
|
|
26
|
-
*/
|
|
27
|
-
export function LlmCardFooter({ children, className, ...rest }) {
|
|
28
|
-
return (_jsx("div", { className: ['llm-card-footer', className].filter(Boolean).join(' '), ...rest, children: children }));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=llm-card.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { LlmIconName, LlmIconSize, LlmIconSpec } from '../spec';
|
|
3
|
-
import './llm-icon.css';
|
|
4
|
-
/**
|
|
5
|
-
* Properties for the LlmIcon component.
|
|
6
|
-
*/
|
|
7
|
-
export interface LlmIconProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'aria-label'>, LlmIconSpec {
|
|
8
|
-
/** The icon name. */
|
|
9
|
-
name: LlmIconName;
|
|
10
|
-
/** The icon size. */
|
|
11
|
-
size?: LlmIconSize;
|
|
12
|
-
/**
|
|
13
|
-
* Accessible label. When provided, the icon is announced as an image with
|
|
14
|
-
* this label. When omitted, the icon is hidden from assistive tech.
|
|
15
|
-
*/
|
|
16
|
-
label?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Pictogram glyph icon. 21 named variants matching the Figma `LlmIcon`
|
|
20
|
-
* component set. Decorative by default; pass `label` to announce a meaning
|
|
21
|
-
* to assistive tech.
|
|
22
|
-
*/
|
|
23
|
-
export declare function LlmIcon({ name, size, label, className, ...rest }: LlmIconProps): import("react").JSX.Element;
|
|
24
|
-
//# sourceMappingURL=llm-icon.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
-
import type { LlmTableSpec, LlmTbodySpec, LlmTrSpec, LlmThSpec, LlmTdSpec, LlmSortDirection } from '../spec';
|
|
3
|
-
import './llm-table.css';
|
|
4
|
-
export type { LlmSortDirection };
|
|
5
|
-
export interface LlmTableProps extends HTMLAttributes<HTMLDivElement>, LlmTableSpec {
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Accessible name for the scrollable table region. Surfaces to
|
|
9
|
-
* screen readers as the region's label so keyboard users who
|
|
10
|
-
* scroll the wrapper know what they're scrolling. Defaults to
|
|
11
|
-
* `"Table"` if unset.
|
|
12
|
-
*/
|
|
13
|
-
'aria-label'?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function LlmTable({ variant, size, stickyHeader, children, className, 'aria-label': ariaLabel, ...rest }: LlmTableProps): import("react").JSX.Element;
|
|
16
|
-
export interface LlmTheadProps {
|
|
17
|
-
children?: ReactNode;
|
|
18
|
-
}
|
|
19
|
-
export declare function LlmThead({ children }: LlmTheadProps): import("react").JSX.Element;
|
|
20
|
-
export interface LlmTbodyProps extends LlmTbodySpec {
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
/** Content shown in place of rows when empty=true. */
|
|
23
|
-
emptyContent?: ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export declare function LlmTbody({ empty, colSpan, children, emptyContent }: LlmTbodyProps): import("react").JSX.Element;
|
|
26
|
-
export interface LlmTrProps extends LlmTrSpec {
|
|
27
|
-
children?: ReactNode;
|
|
28
|
-
onSelectedChange?: (selected: boolean) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare function LlmTr({ selected, selectable, children, onSelectedChange, }: LlmTrProps): import("react").JSX.Element;
|
|
31
|
-
export interface LlmThProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, 'align'>, LlmThSpec {
|
|
32
|
-
children?: ReactNode;
|
|
33
|
-
onSort?: (direction: LlmSortDirection) => void;
|
|
34
|
-
}
|
|
35
|
-
export declare function LlmTh({ sortable, sortDirection, align, width, children, onSort, className, ...rest }: LlmThProps): import("react").JSX.Element;
|
|
36
|
-
export interface LlmTdProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, 'align'>, LlmTdSpec {
|
|
37
|
-
children?: ReactNode;
|
|
38
|
-
}
|
|
39
|
-
export declare function LlmTd({ align, children, className, ...rest }: LlmTdProps): import("react").JSX.Element;
|
|
40
|
-
//# sourceMappingURL=llm-table.d.ts.map
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import type { LlmToastOptions, LlmToastContainerPosition } from '../spec';
|
|
3
|
-
import './llm-toast.css';
|
|
4
|
-
/**
|
|
5
|
-
* Internal data structure for a toast message.
|
|
6
|
-
*/
|
|
7
|
-
export interface ToastData extends Required<LlmToastOptions> {
|
|
8
|
-
id: string;
|
|
9
|
-
message: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Context provider that manages the toast state.
|
|
13
|
-
*/
|
|
14
|
-
export declare function LlmToastProvider({ children }: {
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
17
|
-
/** Access toast actions: show, dismiss, clear. Must be inside LlmToastProvider. */
|
|
18
|
-
export declare function useLlmToast(): {
|
|
19
|
-
show: (message: string, options?: LlmToastOptions) => string;
|
|
20
|
-
dismiss: (id: string) => void;
|
|
21
|
-
clear: () => void;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Properties for the LlmToastContainer component.
|
|
25
|
-
*/
|
|
26
|
-
export interface LlmToastContainerProps {
|
|
27
|
-
/**
|
|
28
|
-
* Position of the toast container in the viewport.
|
|
29
|
-
*/
|
|
30
|
-
position?: LlmToastContainerPosition;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Renders the toast stack at a fixed viewport position.
|
|
34
|
-
* Must be placed inside LlmToastProvider.
|
|
35
|
-
*/
|
|
36
|
-
export declare function LlmToastContainer({ position }: LlmToastContainerProps): import("react").JSX.Element;
|
|
37
|
-
/**
|
|
38
|
-
* Properties for the LlmToastItem component.
|
|
39
|
-
*/
|
|
40
|
-
export interface LlmToastItemProps {
|
|
41
|
-
/**
|
|
42
|
-
* The toast data to display.
|
|
43
|
-
*/
|
|
44
|
-
data: ToastData;
|
|
45
|
-
/**
|
|
46
|
-
* Callback fired when the toast is dismissed.
|
|
47
|
-
*/
|
|
48
|
-
onDismiss: (id: string) => void;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* An individual toast notification item.
|
|
52
|
-
*/
|
|
53
|
-
export declare function LlmToastItem({ data, onDismiss }: LlmToastItemProps): import("react").JSX.Element;
|
|
54
|
-
//# sourceMappingURL=llm-toast.d.ts.map
|