@ukic/canary-web-components 2.0.0-canary.37 → 2.0.0-canary.39
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/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +6 -2
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +110 -57
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +9 -0
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +605 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.js +6 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js +414 -0
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -0
- package/dist/collection/components/ic-data-table/story-data.js +155 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js +98 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -0
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js +341 -0
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +10 -3
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +152 -57
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +167 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -0
- package/dist/collection/components/ic-date-picker/story-data.js +34 -3
- package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +260 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js +144 -0
- package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js.map +1 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +22 -3
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +456 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -0
- package/dist/components/ic-data-table.js +6 -2
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-picker.js +112 -57
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-navigation-group.js +11 -2
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-tree-item.js +1 -1
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-04fe848d.entry.js +2 -0
- package/dist/core/p-04fe848d.entry.js.map +1 -0
- package/dist/core/{p-b4f824a6.entry.js → p-3ebd4703.entry.js} +2 -2
- package/dist/core/p-3ebd4703.entry.js.map +1 -0
- package/dist/core/p-bd0328f3.entry.js +2 -0
- package/dist/core/p-bd0328f3.entry.js.map +1 -0
- package/dist/core/p-cc0e0b46.entry.js +2 -0
- package/dist/core/p-cc0e0b46.entry.js.map +1 -0
- package/dist/core/p-fac387e8.entry.js +2 -0
- package/dist/core/p-fac387e8.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-data-table.entry.js +6 -2
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +110 -57
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +10 -1
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.stories.d.ts +82 -0
- package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +239 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +57 -0
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.d.ts +47 -0
- package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +124 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +18 -1
- package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +153 -0
- package/dist/types/components/ic-date-picker/story-data.d.ts +2 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.stories.d.ts +106 -0
- package/dist/types/components/ic-select-with-multi/ic-select-multi.stories.d.ts +106 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +99 -0
- package/dist/types/components.d.ts +13 -0
- package/hydrate/index.js +129 -62
- package/package.json +12 -12
- package/dist/core/p-4084bce2.entry.js +0 -2
- package/dist/core/p-4084bce2.entry.js.map +0 -1
- package/dist/core/p-71bbb583.entry.js +0 -2
- package/dist/core/p-71bbb583.entry.js.map +0 -1
- package/dist/core/p-89112e37.entry.js +0 -2
- package/dist/core/p-89112e37.entry.js.map +0 -1
- package/dist/core/p-b4f824a6.entry.js.map +0 -1
- package/dist/core/p-fe105ed0.entry.js +0 -2
- package/dist/core/p-fe105ed0.entry.js.map +0 -1
@@ -62,6 +62,12 @@ export const Value = () => {
|
|
62
62
|
datePicker.value = "01/01/2024";
|
63
63
|
return datePicker;
|
64
64
|
};
|
65
|
+
export const ValueCalendarOnlyMode = () => {
|
66
|
+
const datePicker = createDatePickerElement();
|
67
|
+
datePicker.value = "06/06/1944";
|
68
|
+
datePicker.showDateInput = false;
|
69
|
+
return datePicker;
|
70
|
+
};
|
65
71
|
export const OpenAt = () => {
|
66
72
|
const datePicker = createDatePickerElement();
|
67
73
|
datePicker.helperText =
|
@@ -122,18 +128,27 @@ export const JSDates = () => {
|
|
122
128
|
datePicker.value = new Date(2024, 6, 15);
|
123
129
|
return datePicker;
|
124
130
|
};
|
125
|
-
const
|
131
|
+
const handleDateChange = (ev) => {
|
126
132
|
const el = document.querySelector("#selected-date");
|
127
133
|
let text = "Selected date: ";
|
128
134
|
if (ev.detail.value) {
|
129
135
|
text += ev.detail.value;
|
130
136
|
}
|
131
137
|
el.innerHTML = text;
|
132
|
-
console.log("
|
138
|
+
console.log("icChange: ", ev.detail.value);
|
139
|
+
};
|
140
|
+
const handleSelectedDateChange = (ev) => {
|
141
|
+
const el = document.querySelector("#selected-date");
|
142
|
+
let text = "Selected date: ";
|
143
|
+
if (ev.detail.value) {
|
144
|
+
text += ev.detail.value;
|
145
|
+
}
|
146
|
+
el.innerHTML = text;
|
147
|
+
console.log("icSelectedDateChange: ", ev.detail.value);
|
133
148
|
};
|
134
149
|
export const IcChangeDate = () => {
|
135
150
|
const datePicker = createDatePickerElement();
|
136
|
-
datePicker.addEventListener("icChange",
|
151
|
+
datePicker.addEventListener("icChange", handleDateChange);
|
137
152
|
const container = document.createElement("div");
|
138
153
|
const selDate = document.createElement("span");
|
139
154
|
selDate.innerText = "Selected date:";
|
@@ -145,4 +160,20 @@ export const IcChangeDate = () => {
|
|
145
160
|
container.style.gap = "50px";
|
146
161
|
return container;
|
147
162
|
};
|
163
|
+
export const IcSelectedDateChange = () => {
|
164
|
+
const datePicker = createDatePickerElement();
|
165
|
+
datePicker.size = "large";
|
166
|
+
datePicker.showDateInput = false;
|
167
|
+
datePicker.addEventListener("icSelectedDateChange", handleSelectedDateChange);
|
168
|
+
const container = document.createElement("div");
|
169
|
+
const selDate = document.createElement("div");
|
170
|
+
selDate.innerText = "Selected date:";
|
171
|
+
selDate.id = "selected-date";
|
172
|
+
container.appendChild(datePicker);
|
173
|
+
container.appendChild(selDate);
|
174
|
+
container.style.display = "flex";
|
175
|
+
container.style.flexDirection = "column";
|
176
|
+
container.style.gap = "50px";
|
177
|
+
return container;
|
178
|
+
};
|
148
179
|
//# sourceMappingURL=story-data.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../src/components/ic-date-picker/story-data.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,CAAC,MAAM,iBAAiB,GAAG,6CAA6C,CAAC;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC5D,UAAU,CAAC,KAAK,GAAG,iBAAiB,CAAC;IACrC,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAA4B,EAAE,CAAC,uBAAuB,EAAE,CAAC;AAEhF,MAAM,CAAC,MAAM,KAAK,GAAG,GAA4B,EAAE;IACjD,MAAM,UAAU,GAAG,uBAAuB,EAAE,CAAC;IAC7C,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC;IAC1B,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAA4B,EAAE;IACjD,MAAM,UAAU,GAAG,uBAAuB,EAAE,CAAC;IAC7C,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC;IAC1B,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAgB,EAAE;IACrC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AAkB,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,CAAC,SAAS,GAAG,gBAAgB,CAAC;IACrC,OAAO,CAAC,EAAE,GAAG,eAAe,CAAC;IAE7B,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAE/B,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC;IACzC,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC;IAE7B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/* eslint-disable */\nexport const DATE_PICKER_LABEL = \"When would you like to collect your coffee?\";\n\nexport const createDatePickerElement = () => {\n const datePicker = document.createElement(\"ic-date-picker\");\n datePicker.label = DATE_PICKER_LABEL;\n return datePicker;\n};\n\nexport const Default = (): HTMLIcDatePickerElement => createDatePickerElement();\n\nexport const Small = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.size = \"small\";\n return datePicker;\n};\n\nexport const Large = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.size = \"large\";\n return datePicker;\n};\n\nexport const Sizes = (): HTMLElement => {\n const container = document.createElement(\"div\");\n\n container.appendChild(Small());\n container.appendChild(Default());\n container.appendChild(Large());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const MaxWidth = (): HTMLElement => {\n const container = document.createElement(\"div\");\n container.className = \"dp-max-width-example\";\n\n container.appendChild(Small());\n container.appendChild(Default());\n container.appendChild(Large());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const MonthFirst = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.dateFormat = \"MM/DD/YYYY\";\n return datePicker;\n};\n\nexport const YearFirst = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.dateFormat = \"YYYY/MM/DD\";\n return datePicker;\n};\n\nexport const DateFormats = (): HTMLElement => {\n const container = document.createElement(\"div\");\n\n container.appendChild(Default());\n container.appendChild(MonthFirst());\n container.appendChild(YearFirst());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const Value = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.value = \"01/01/2024\";\n return datePicker;\n};\n\nexport const OpenAt = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText =\n \"The calendar will open showing 25th December 2024, if no date selected\";\n datePicker.openAtDate = \"2024-12-25\";\n return datePicker;\n};\n\nexport const WeekStart = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.startOfWeek = 0;\n return datePicker;\n};\n\nexport const WorkingWeek = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disableDays = [0, 6];\n return datePicker;\n};\n\nexport const MaxMin = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText = \"Choose a date between the 1st and 31st of July\";\n datePicker.min = \"2024-07-01\";\n datePicker.max = \"2024-07-31\";\n datePicker.showPickerTodayButton = false;\n return datePicker;\n};\n\nexport const Disabled = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disabled = true;\n return datePicker;\n};\n\nexport const DisablePast = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disablePast = true;\n return datePicker;\n};\n\nexport const DisableFuture = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disableFuture = true;\n return datePicker;\n};\n\nexport const HideOutsideMonth = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.showDaysOutsideMonth = false;\n return datePicker;\n};\n\nexport const HideButtons = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.showPickerClearButton = false;\n datePicker.showPickerTodayButton = false;\n return datePicker;\n};\n\nexport const JSDates = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText = \"Choose a date between the 1st and 31st of July\";\n datePicker.showPickerTodayButton = false;\n datePicker.min = new Date(2024, 6, 1);\n datePicker.max = new Date(2024, 6, 31);\n datePicker.value = new Date(2024, 6, 15);\n return datePicker;\n};\n\nconst updateSelectedDate = (ev: CustomEvent): void => {\n const el = document.querySelector(\"#selected-date\");\n let text = \"Selected date: \";\n if (ev.detail.value) {\n text += ev.detail.value;\n }\n el.innerHTML = text;\n console.log(\"ic-change\", ev.detail.value);\n};\n\nexport const IcChangeDate = (): HTMLElement => {\n const datePicker = createDatePickerElement();\n datePicker.addEventListener(\"icChange\", updateSelectedDate);\n const container = document.createElement(\"div\");\n\n const selDate = document.createElement(\"span\");\n selDate.innerText = \"Selected date:\";\n selDate.id = \"selected-date\";\n\n container.appendChild(datePicker);\n container.appendChild(selDate);\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"50px\";\n\n return container;\n};\n"]}
|
1
|
+
{"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../src/components/ic-date-picker/story-data.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,CAAC,MAAM,iBAAiB,GAAG,6CAA6C,CAAC;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC5D,UAAU,CAAC,KAAK,GAAG,iBAAiB,CAAC;IACrC,OAAO,UAAU,CAAC;AAC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,CAAC,CAAC","sourcesContent":["/* eslint-disable */\nexport const DATE_PICKER_LABEL = \"When would you like to collect your coffee?\";\n\nexport const createDatePickerElement = () => {\n const datePicker = document.createElement(\"ic-date-picker\");\n datePicker.label = DATE_PICKER_LABEL;\n return datePicker;\n};\n\nexport const Default = (): HTMLIcDatePickerElement => createDatePickerElement();\n\nexport const Small = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.size = \"small\";\n return datePicker;\n};\n\nexport const Large = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.size = \"large\";\n return datePicker;\n};\n\nexport const Sizes = (): HTMLElement => {\n const container = document.createElement(\"div\");\n\n container.appendChild(Small());\n container.appendChild(Default());\n container.appendChild(Large());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const MaxWidth = (): HTMLElement => {\n const container = document.createElement(\"div\");\n container.className = \"dp-max-width-example\";\n\n container.appendChild(Small());\n container.appendChild(Default());\n container.appendChild(Large());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const MonthFirst = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.dateFormat = \"MM/DD/YYYY\";\n return datePicker;\n};\n\nexport const YearFirst = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.dateFormat = \"YYYY/MM/DD\";\n return datePicker;\n};\n\nexport const DateFormats = (): HTMLElement => {\n const container = document.createElement(\"div\");\n\n container.appendChild(Default());\n container.appendChild(MonthFirst());\n container.appendChild(YearFirst());\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"16px\";\n\n return container;\n};\n\nexport const Value = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.value = \"01/01/2024\";\n return datePicker;\n};\n\nexport const ValueCalendarOnlyMode = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.value = \"06/06/1944\";\n datePicker.showDateInput = false;\n return datePicker;\n};\n\nexport const OpenAt = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText =\n \"The calendar will open showing 25th December 2024, if no date selected\";\n datePicker.openAtDate = \"2024-12-25\";\n return datePicker;\n};\n\nexport const WeekStart = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.startOfWeek = 0;\n return datePicker;\n};\n\nexport const WorkingWeek = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disableDays = [0, 6];\n return datePicker;\n};\n\nexport const MaxMin = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText = \"Choose a date between the 1st and 31st of July\";\n datePicker.min = \"2024-07-01\";\n datePicker.max = \"2024-07-31\";\n datePicker.showPickerTodayButton = false;\n return datePicker;\n};\n\nexport const Disabled = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disabled = true;\n return datePicker;\n};\n\nexport const DisablePast = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disablePast = true;\n return datePicker;\n};\n\nexport const DisableFuture = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.disableFuture = true;\n return datePicker;\n};\n\nexport const HideOutsideMonth = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.showDaysOutsideMonth = false;\n return datePicker;\n};\n\nexport const HideButtons = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.showPickerClearButton = false;\n datePicker.showPickerTodayButton = false;\n return datePicker;\n};\n\nexport const JSDates = (): HTMLIcDatePickerElement => {\n const datePicker = createDatePickerElement();\n datePicker.helperText = \"Choose a date between the 1st and 31st of July\";\n datePicker.showPickerTodayButton = false;\n datePicker.min = new Date(2024, 6, 1);\n datePicker.max = new Date(2024, 6, 31);\n datePicker.value = new Date(2024, 6, 15);\n return datePicker;\n};\n\nconst handleDateChange = (ev: CustomEvent): void => {\n const el = document.querySelector(\"#selected-date\");\n let text = \"Selected date: \";\n if (ev.detail.value) {\n text += ev.detail.value;\n }\n el.innerHTML = text;\n console.log(\"icChange: \", ev.detail.value);\n};\n\nconst handleSelectedDateChange = (ev: CustomEvent): void => {\n const el = document.querySelector(\"#selected-date\");\n let text = \"Selected date: \";\n if (ev.detail.value) {\n text += ev.detail.value;\n }\n el.innerHTML = text;\n console.log(\"icSelectedDateChange: \", ev.detail.value);\n};\n\nexport const IcChangeDate = (): HTMLElement => {\n const datePicker = createDatePickerElement();\n datePicker.addEventListener(\"icChange\", handleDateChange);\n const container = document.createElement(\"div\");\n\n const selDate = document.createElement(\"span\");\n selDate.innerText = \"Selected date:\";\n selDate.id = \"selected-date\";\n\n container.appendChild(datePicker);\n container.appendChild(selDate);\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"50px\";\n\n return container;\n};\n\nexport const IcSelectedDateChange = (): HTMLElement => {\n const datePicker = createDatePickerElement();\n\n datePicker.size = \"large\";\n datePicker.showDateInput = false;\n\n datePicker.addEventListener(\"icSelectedDateChange\", handleSelectedDateChange);\n const container = document.createElement(\"div\");\n\n const selDate = document.createElement(\"div\");\n selDate.innerText = \"Selected date:\";\n selDate.id = \"selected-date\";\n\n container.appendChild(datePicker);\n container.appendChild(selDate);\n\n container.style.display = \"flex\";\n container.style.flexDirection = \"column\";\n container.style.gap = \"50px\";\n\n return container;\n};\n"]}
|
@@ -0,0 +1,260 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
2
|
+
import readme from "./readme.md";
|
3
|
+
import { html } from "lit-html";
|
4
|
+
export default {
|
5
|
+
title: "Web Components/Pagination Bar",
|
6
|
+
component: "ic-pagination-bar",
|
7
|
+
parameters: {
|
8
|
+
componentAPI: {
|
9
|
+
data: readme,
|
10
|
+
},
|
11
|
+
},
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Use the pagination bar when large amounts of content are split across multiple pages and various pagination options are required.
|
15
|
+
*
|
16
|
+
* There is one required attribute for the pagination bar:
|
17
|
+
* - total-items: `number`
|
18
|
+
*
|
19
|
+
* Click the 'Component API' tab to view all the available attributes, events and slots for pagination bar.
|
20
|
+
*
|
21
|
+
* To use the pagination bar component, import `@ukic/canary-web-components` into your application.
|
22
|
+
*/
|
23
|
+
export const Basic = {
|
24
|
+
render: () => html `<div style="height: 120px;">
|
25
|
+
<ic-pagination-bar total-items="100"></ic-pagination-bar>
|
26
|
+
</div>`,
|
27
|
+
name: "Basic",
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* Pagination bar will display the number of pages out of the total number of pages as well as the `simple` pagination type.
|
31
|
+
*
|
32
|
+
* By default, the items per page is set to 10. If the total items is greater than 100, the default items per page is set to 25.
|
33
|
+
*
|
34
|
+
* To display the items per page control, set the `show-items-per-page-control` attribute to `true`.
|
35
|
+
*
|
36
|
+
* The items per page control will display a dropdown with options to select the number of items to display per page. Customize the options by setting the `itemsPerPageOptions` property.
|
37
|
+
* `itemsPerPageOptions` is an array of objects with `label` and `value` properties. If more than three options are provided, the dropdown will display the first three options and an 'All' option.
|
38
|
+
*/
|
39
|
+
export const ItemsPerPageControl = {
|
40
|
+
render: () => html `<div style="height: 150px;">
|
41
|
+
<ic-pagination-bar
|
42
|
+
total-items="100"
|
43
|
+
show-items-per-page-control="true"
|
44
|
+
></ic-pagination-bar>
|
45
|
+
</div>`,
|
46
|
+
name: "Items per page control",
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* To display the go to page control, set the `show-go-to-page-control` attribute to `true`. 'Go to page' allows the user to jump to a specific page. If the page number is invalid, the input will be styled in the `ic-status-error` colour with a tooltip detailing the error.
|
50
|
+
*/
|
51
|
+
export const GoToPageControl = {
|
52
|
+
render: () => html `<div style="height: 120px;">
|
53
|
+
<ic-pagination-bar
|
54
|
+
total-items="100"
|
55
|
+
show-go-to-page-control="true"
|
56
|
+
></ic-pagination-bar>
|
57
|
+
</div>`,
|
58
|
+
name: "Go to page control",
|
59
|
+
};
|
60
|
+
/**
|
61
|
+
* The pagination range label type can be set to two types:
|
62
|
+
* - `simple`: \[default]: Display the total number of pages and the current page number.
|
63
|
+
* - `data`: Displays the total number of items and the items range.
|
64
|
+
*
|
65
|
+
* The example below uses the `data` pagination range label type. The range is updated when the page is changed.
|
66
|
+
*/
|
67
|
+
export const PaginationRangeLabelType = {
|
68
|
+
render: () => html `<div style="height: 150px;">
|
69
|
+
<ic-pagination-bar
|
70
|
+
total-items="100"
|
71
|
+
show-items-per-page-control="true"
|
72
|
+
show-go-to-page-control="true"
|
73
|
+
range-label-type="data"
|
74
|
+
></ic-pagination-bar>
|
75
|
+
</div>`,
|
76
|
+
name: "Pagination range label type",
|
77
|
+
};
|
78
|
+
/**
|
79
|
+
* 'Item' can be changed to a custom label by setting the `item-label` attribute. Any occurrences of 'Item' in the pagination bar will be replaced with the custom label.
|
80
|
+
*/
|
81
|
+
export const PaginationItemLabel = {
|
82
|
+
render: () => html `<div style="height: 150px;">
|
83
|
+
<ic-pagination-bar
|
84
|
+
total-items="100"
|
85
|
+
show-items-per-page-control="true"
|
86
|
+
show-go-to-page-control="true"
|
87
|
+
range-label-type="data"
|
88
|
+
item-label="Image"
|
89
|
+
></ic-pagination-bar>
|
90
|
+
</div>`,
|
91
|
+
name: "Pagination item label",
|
92
|
+
};
|
93
|
+
/**
|
94
|
+
* The pagination type can be set to two types:
|
95
|
+
* - `simple`: \[default]: Display the current page as a label with back and next buttons.
|
96
|
+
* - `complex`: Displays all the page numbers as buttons with back and next buttons.
|
97
|
+
*
|
98
|
+
* The `complex` pagination type is useful when there are many pages to navigate through.
|
99
|
+
*/
|
100
|
+
export const PaginationType = {
|
101
|
+
render: () => html `<div style="height: 150px;">
|
102
|
+
<ic-pagination-bar
|
103
|
+
total-items="100"
|
104
|
+
show-items-per-page-control="true"
|
105
|
+
type="complex"
|
106
|
+
></ic-pagination-bar>
|
107
|
+
</div>`,
|
108
|
+
name: "Pagination type",
|
109
|
+
};
|
110
|
+
/**
|
111
|
+
* The pagination elements can be aligned to the `right` (default), `left` or `space-between`.
|
112
|
+
*/
|
113
|
+
export const AlignmentLeft = {
|
114
|
+
render: () => html `<div style="height: 150px;">
|
115
|
+
<ic-pagination-bar
|
116
|
+
total-items="100"
|
117
|
+
alignment="left"
|
118
|
+
show-items-per-page-control="true"
|
119
|
+
show-go-to-page-control="true"
|
120
|
+
></ic-pagination-bar>
|
121
|
+
</div>`,
|
122
|
+
name: "Alignment left",
|
123
|
+
};
|
124
|
+
export const AlignmentSpaceBetween = {
|
125
|
+
render: () => html `<div style="height: 150px;">
|
126
|
+
<ic-pagination-bar
|
127
|
+
total-items="100"
|
128
|
+
alignment="space-between"
|
129
|
+
show-items-per-page-control="true"
|
130
|
+
show-go-to-page-control="true"
|
131
|
+
></ic-pagination-bar>
|
132
|
+
</div>`,
|
133
|
+
name: "Alignment space between",
|
134
|
+
};
|
135
|
+
/**
|
136
|
+
* The background colour of the pagination bar can be customized by adding a background colour to the parent element. The `appearance` attribute can be set to `light` or `dark` to change the appearance of the pagination bar labels.
|
137
|
+
*/
|
138
|
+
export const Appearance = {
|
139
|
+
render: () => html `<div
|
140
|
+
style="display: flex; flex-direction: column; gap: 8px; height: 220px"
|
141
|
+
>
|
142
|
+
<div style="background-color: var(--ic-architectural-black)">
|
143
|
+
<ic-pagination-bar
|
144
|
+
total-items="100"
|
145
|
+
appearance="light"
|
146
|
+
show-items-per-page-control="true"
|
147
|
+
show-go-to-page-control="true"
|
148
|
+
></ic-pagination-bar>
|
149
|
+
</div>
|
150
|
+
<div style="background-color: var(--ic-status-info-contrast)">
|
151
|
+
<ic-pagination-bar
|
152
|
+
total-items="100"
|
153
|
+
appearance="dark"
|
154
|
+
show-items-per-page-control="true"
|
155
|
+
show-go-to-page-control="true"
|
156
|
+
></ic-pagination-bar>
|
157
|
+
</div>
|
158
|
+
</div>`,
|
159
|
+
name: "Appearance",
|
160
|
+
};
|
161
|
+
/**
|
162
|
+
* If the pagination bar becomes cluttered due to the number of pagination elements displayed, the range label can be hidden by setting the `hide-range-label` attribute to `true`.
|
163
|
+
*/
|
164
|
+
export const HideRangeLabel = {
|
165
|
+
render: () => html `<div style="height:150px">
|
166
|
+
<div style="background-color: var(--ic-architectural-100)">
|
167
|
+
<ic-pagination-bar
|
168
|
+
total-items="100"
|
169
|
+
appearance="dark"
|
170
|
+
hide-range-label="true"
|
171
|
+
show-items-per-page-control="true"
|
172
|
+
show-go-to-page-control="true"
|
173
|
+
></ic-pagination-bar>
|
174
|
+
</div>
|
175
|
+
</div>`,
|
176
|
+
name: "Hide range label",
|
177
|
+
};
|
178
|
+
/**
|
179
|
+
* If you have a predefined list of items you want in the itemsPerPage select, the 'All' option can be hidden by setting `hide-all-from-items-per-page` to `true`.
|
180
|
+
*/
|
181
|
+
export const HideAllFromItemsPerPage = {
|
182
|
+
render: () => html `<div style="height:150px">
|
183
|
+
<ic-pagination-bar
|
184
|
+
total-items="100"
|
185
|
+
show-items-per-page-control="true"
|
186
|
+
show-go-to-page-control="true"
|
187
|
+
hide-all-from-items-per-page="true"
|
188
|
+
></ic-pagination-bar>
|
189
|
+
</div>`,
|
190
|
+
name: "Hide all from items per page",
|
191
|
+
};
|
192
|
+
export const SetToFirstPageWhenItemsPerPageChanges = {
|
193
|
+
render: () => html `<div style="height:150px">
|
194
|
+
<ic-pagination-bar
|
195
|
+
total-items="100"
|
196
|
+
show-items-per-page-control="true"
|
197
|
+
show-go-to-page-control="true"
|
198
|
+
hide-all-from-items-per-page="true"
|
199
|
+
set-to-first-page-on-pagination-change="true"
|
200
|
+
></ic-pagination-bar>
|
201
|
+
</div>`,
|
202
|
+
name: "Set to first page when items per page changes",
|
203
|
+
};
|
204
|
+
/**
|
205
|
+
* The `selected-items-per-page` prop can be used to programmatically set the items per page dropdown option.
|
206
|
+
*/
|
207
|
+
export const SetSelectedItemsPerPage = {
|
208
|
+
render: () => html `<div style="height:150px">
|
209
|
+
<ic-pagination-bar
|
210
|
+
total-items="100"
|
211
|
+
show-items-per-page-control="true"
|
212
|
+
show-go-to-page-control="true"
|
213
|
+
selected-items-per-page="25"
|
214
|
+
></ic-pagination-bar>
|
215
|
+
</div>`,
|
216
|
+
name: "Set the selected items per page",
|
217
|
+
};
|
218
|
+
/**
|
219
|
+
* The `selected-items-per-page` prop can be used to programmatically set the selected items per page dropdown option. If provided, this prop must match one of the items per page dropdown options, otherwise an error appears on the console and the prop is ignored.
|
220
|
+
*/
|
221
|
+
export const SetSelectedItemsPerPageToInvalidValue = {
|
222
|
+
render: () => html `<div style="height:150px">
|
223
|
+
<ic-pagination-bar
|
224
|
+
total-items="100"
|
225
|
+
show-items-per-page-control="true"
|
226
|
+
show-go-to-page-control="true"
|
227
|
+
selected-items-per-page="99"
|
228
|
+
></ic-pagination-bar>
|
229
|
+
</div>`,
|
230
|
+
name: "Set the selected items per page to an invalid value",
|
231
|
+
};
|
232
|
+
/**
|
233
|
+
* The `current-page` prop can be used to programmatically set the current page.
|
234
|
+
*/
|
235
|
+
export const SetCurrentPage = {
|
236
|
+
render: () => html `<div style="height:150px">
|
237
|
+
<ic-pagination-bar
|
238
|
+
total-items="100"
|
239
|
+
show-items-per-page-control="true"
|
240
|
+
show-go-to-page-control="true"
|
241
|
+
current-page="3"
|
242
|
+
></ic-pagination-bar>
|
243
|
+
</div>`,
|
244
|
+
name: "Set the current page",
|
245
|
+
};
|
246
|
+
/**
|
247
|
+
* The `current-page` prop can be used to programmatically set the current page. If provided, this prop must be greater than 0 and less than or equal to the total number of pages, otherwise an error appears on the console and the prop is ignored.
|
248
|
+
*/
|
249
|
+
export const SetCurrentPageToInvalidValue = {
|
250
|
+
render: () => html `<div style="height:150px">
|
251
|
+
<ic-pagination-bar
|
252
|
+
total-items="100"
|
253
|
+
show-items-per-page-control="true"
|
254
|
+
show-go-to-page-control="true"
|
255
|
+
current-page="-1"
|
256
|
+
></ic-pagination-bar>
|
257
|
+
</div>`,
|
258
|
+
name: "Set the current page to an invalid value",
|
259
|
+
};
|
260
|
+
//# sourceMappingURL=ic-pagination-bar.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ic-pagination-bar.stories.js","sourceRoot":"","sources":["../../../src/components/ic-pagination-bar/ic-pagination-bar.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,mBAAmB;IAE9B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;WAEG;IACT,IAAI,EAAE,OAAO;CACd,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;WAKG;IAET,IAAI,EAAE,wBAAwB;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;WAKG;IAET,IAAI,EAAE,oBAAoB;CAC3B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;WAOG;IAET,IAAI,EAAE,6BAA6B;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;WAQG;IAET,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEF;;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AAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;SAOX;IACP,IAAI,EAAE,qDAAqD;CAC5D,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;SAOX;IACP,IAAI,EAAE,sBAAsB;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;SAOX;IACP,IAAI,EAAE,0CAA0C;CACjD,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport readme from \"./readme.md\";\nimport { html } from \"lit-html\";\n\nexport default {\n title: \"Web Components/Pagination Bar\",\n component: \"ic-pagination-bar\",\n\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the pagination bar when large amounts of content are split across multiple pages and various pagination options are required.\n *\n * There is one required attribute for the pagination bar:\n * - total-items: `number`\n *\n * Click the 'Component API' tab to view all the available attributes, events and slots for pagination bar.\n *\n * To use the pagination bar component, import `@ukic/canary-web-components` into your application.\n */\nexport const Basic = {\n render: () =>\n html`<div style=\"height: 120px;\">\n <ic-pagination-bar total-items=\"100\"></ic-pagination-bar>\n </div>`,\n name: \"Basic\",\n};\n\n/**\n * Pagination bar will display the number of pages out of the total number of pages as well as the `simple` pagination type.\n *\n * By default, the items per page is set to 10. If the total items is greater than 100, the default items per page is set to 25.\n *\n * To display the items per page control, set the `show-items-per-page-control` attribute to `true`.\n *\n * The items per page control will display a dropdown with options to select the number of items to display per page. Customize the options by setting the `itemsPerPageOptions` property.\n * `itemsPerPageOptions` is an array of objects with `label` and `value` properties. If more than three options are provided, the dropdown will display the first three options and an 'All' option.\n */\nexport const ItemsPerPageControl = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Items per page control\",\n};\n\n/**\n * To display the go to page control, set the `show-go-to-page-control` attribute to `true`. 'Go to page' allows the user to jump to a specific page. If the page number is invalid, the input will be styled in the `ic-status-error` colour with a tooltip detailing the error.\n */\nexport const GoToPageControl = {\n render: () =>\n html`<div style=\"height: 120px;\">\n <ic-pagination-bar\n total-items=\"100\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Go to page control\",\n};\n\n/**\n * The pagination range label type can be set to two types:\n * - `simple`: \\[default]: Display the total number of pages and the current page number.\n * - `data`: Displays the total number of items and the items range.\n *\n * The example below uses the `data` pagination range label type. The range is updated when the page is changed.\n */\nexport const PaginationRangeLabelType = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n range-label-type=\"data\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Pagination range label type\",\n};\n\n/**\n * 'Item' can be changed to a custom label by setting the `item-label` attribute. Any occurrences of 'Item' in the pagination bar will be replaced with the custom label.\n */\nexport const PaginationItemLabel = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n range-label-type=\"data\"\n item-label=\"Image\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Pagination item label\",\n};\n\n/**\n * The pagination type can be set to two types:\n * - `simple`: \\[default]: Display the current page as a label with back and next buttons.\n * - `complex`: Displays all the page numbers as buttons with back and next buttons.\n *\n * The `complex` pagination type is useful when there are many pages to navigate through.\n */\nexport const PaginationType = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n type=\"complex\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Pagination type\",\n};\n\n/**\n * The pagination elements can be aligned to the `right` (default), `left` or `space-between`.\n */\nexport const AlignmentLeft = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n alignment=\"left\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Alignment left\",\n};\n\nexport const AlignmentSpaceBetween = {\n render: () =>\n html`<div style=\"height: 150px;\">\n <ic-pagination-bar\n total-items=\"100\"\n alignment=\"space-between\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Alignment space between\",\n};\n\n/**\n * The background colour of the pagination bar can be customized by adding a background colour to the parent element. The `appearance` attribute can be set to `light` or `dark` to change the appearance of the pagination bar labels.\n */\nexport const Appearance = {\n render: () =>\n html`<div\n style=\"display: flex; flex-direction: column; gap: 8px; height: 220px\"\n >\n <div style=\"background-color: var(--ic-architectural-black)\">\n <ic-pagination-bar\n total-items=\"100\"\n appearance=\"light\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>\n <div style=\"background-color: var(--ic-status-info-contrast)\">\n <ic-pagination-bar\n total-items=\"100\"\n appearance=\"dark\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>\n </div>`,\n\n name: \"Appearance\",\n};\n\n/**\n * If the pagination bar becomes cluttered due to the number of pagination elements displayed, the range label can be hidden by setting the `hide-range-label` attribute to `true`.\n */\nexport const HideRangeLabel = {\n render: () =>\n html`<div style=\"height:150px\">\n <div style=\"background-color: var(--ic-architectural-100)\">\n <ic-pagination-bar\n total-items=\"100\"\n appearance=\"dark\"\n hide-range-label=\"true\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n ></ic-pagination-bar>\n </div>\n </div>`,\n\n name: \"Hide range label\",\n};\n\n/**\n * If you have a predefined list of items you want in the itemsPerPage select, the 'All' option can be hidden by setting `hide-all-from-items-per-page` to `true`.\n */\nexport const HideAllFromItemsPerPage = {\n render: () =>\n html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n hide-all-from-items-per-page=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Hide all from items per page\",\n};\n\nexport const SetToFirstPageWhenItemsPerPageChanges = {\n render: () =>\n html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n hide-all-from-items-per-page=\"true\"\n set-to-first-page-on-pagination-change=\"true\"\n ></ic-pagination-bar>\n </div>`,\n\n name: \"Set to first page when items per page changes\",\n};\n\n/**\n * The `selected-items-per-page` prop can be used to programmatically set the items per page dropdown option.\n */\nexport const SetSelectedItemsPerPage = {\n render: () =>\n html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n selected-items-per-page=\"25\"\n ></ic-pagination-bar>\n </div>`,\n name: \"Set the selected items per page\",\n};\n\n/**\n * The `selected-items-per-page` prop can be used to programmatically set the selected items per page dropdown option. If provided, this prop must match one of the items per page dropdown options, otherwise an error appears on the console and the prop is ignored.\n */\nexport const SetSelectedItemsPerPageToInvalidValue = {\n render: () => html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n selected-items-per-page=\"99\"\n ></ic-pagination-bar>\n </div>`,\n name: \"Set the selected items per page to an invalid value\",\n};\n\n/**\n * The `current-page` prop can be used to programmatically set the current page.\n */\nexport const SetCurrentPage = {\n render: () => html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n current-page=\"3\"\n ></ic-pagination-bar>\n </div>`,\n name: \"Set the current page\",\n};\n\n/**\n * The `current-page` prop can be used to programmatically set the current page. If provided, this prop must be greater than 0 and less than or equal to the total number of pages, otherwise an error appears on the console and the prop is ignored.\n */\nexport const SetCurrentPageToInvalidValue = {\n render: () => html`<div style=\"height:150px\">\n <ic-pagination-bar\n total-items=\"100\"\n show-items-per-page-control=\"true\"\n show-go-to-page-control=\"true\"\n current-page=\"-1\"\n ></ic-pagination-bar>\n </div>`,\n name: \"Set the current page to an invalid value\",\n};\n"]}
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
2
|
+
import readme from "./readme.md";
|
3
|
+
import { Default, DefaultValue, Disabled, DisabledOptions, Groups, HelperText, HiddenLabel, InForm, LoadingWithError, ReadOnly, Recommended, Required, Sizes, Validation, WithClearButton, WithDescriptions, } from "./story-data";
|
4
|
+
export default {
|
5
|
+
title: "Web Components/Multi-Select",
|
6
|
+
component: "ic-select-with-multi",
|
7
|
+
parameters: {
|
8
|
+
componentAPI: {
|
9
|
+
data: readme,
|
10
|
+
},
|
11
|
+
},
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Use the multi-select component to allow users to select one or more values from a list of options.
|
15
|
+
* There is one required prop for the multi-select:
|
16
|
+
* - label: `string`
|
17
|
+
*
|
18
|
+
* Click the 'Component API' tab to view all the available props, events and slots for the multi-select.
|
19
|
+
*
|
20
|
+
* To use the multi-select component, import `@ukic/canary-web-components` into your application.
|
21
|
+
*
|
22
|
+
* The component tag name for the multi-select is `ic-select-with-multi`.
|
23
|
+
* Even though it is a variant of the `ic-select` component (which includes the single and searchable selects), this different tag name is necessary because of the need to keep the multi-select functionality separate while it is experimental (in a canary release).
|
24
|
+
* Note that the `multiple` prop still needs to be applied in order to enable the multi-select functionality.
|
25
|
+
*/
|
26
|
+
export const DefaultExample = {
|
27
|
+
render: () => Default(),
|
28
|
+
name: "Default",
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* Show options as pre-selected by setting the `value` prop to an array containing the values of these options.
|
32
|
+
*/
|
33
|
+
export const DefaultValueExample = {
|
34
|
+
render: () => DefaultValue(),
|
35
|
+
name: "Default Value",
|
36
|
+
};
|
37
|
+
/**
|
38
|
+
* Display a clear button by using the `show-clear-button` prop.
|
39
|
+
* This will appear when the user has selected some options and allow them to easily clear their selection.
|
40
|
+
*/
|
41
|
+
export const WithClearButtonExample = {
|
42
|
+
render: () => WithClearButton(),
|
43
|
+
name: "With Clear Button",
|
44
|
+
};
|
45
|
+
/**
|
46
|
+
* Display extra information about the options by providing a description using the `description` property for each option.
|
47
|
+
*/
|
48
|
+
export const WithDescriptionsExample = {
|
49
|
+
render: () => WithDescriptions(),
|
50
|
+
name: "With Descriptions",
|
51
|
+
};
|
52
|
+
/**
|
53
|
+
* Display helper text to provide additional information by using the `helper-text` prop.
|
54
|
+
*/
|
55
|
+
export const HelperTextExample = {
|
56
|
+
render: () => HelperText(),
|
57
|
+
name: "Helper Text",
|
58
|
+
};
|
59
|
+
/**
|
60
|
+
* Set the size of the multi-select by using the `size` prop. This prop takes the values `small`, `default` or `large`.
|
61
|
+
* Depending on the chosen size, the prop will apply styling to increase or decrease the amount of spacing within the component.
|
62
|
+
* The `default` variant is seen in the first [default](#default) example.
|
63
|
+
*/
|
64
|
+
export const SizesExample = {
|
65
|
+
render: () => Sizes(),
|
66
|
+
name: "Sizes",
|
67
|
+
};
|
68
|
+
/**
|
69
|
+
* Disable the multi-select and prevent user interaction by using the `disabled` prop.
|
70
|
+
*/
|
71
|
+
export const DisabledExample = {
|
72
|
+
render: () => Disabled(),
|
73
|
+
name: "Disabled",
|
74
|
+
};
|
75
|
+
/**
|
76
|
+
* Disable certain options by setting the `disabled` property to `true` for each option.
|
77
|
+
*/
|
78
|
+
export const DisabledOptionsExample = {
|
79
|
+
render: () => DisabledOptions(),
|
80
|
+
name: "Disabled Options",
|
81
|
+
};
|
82
|
+
/**
|
83
|
+
* Hide the visible label for the multi-select by using the `hide-label` prop.
|
84
|
+
*/
|
85
|
+
export const HiddenLabelExample = {
|
86
|
+
render: () => HiddenLabel(),
|
87
|
+
name: "Hidden Label",
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* Inform the user that the multi-select is a required field by using the `required` prop.
|
91
|
+
* This will display an asterisk next to the label and apply the `aria-required` attribute.
|
92
|
+
*/
|
93
|
+
export const RequiredExample = {
|
94
|
+
render: () => Required(),
|
95
|
+
name: "Required",
|
96
|
+
};
|
97
|
+
/**
|
98
|
+
* Make the multi-select read-only by using the `readonly` prop.
|
99
|
+
* Use the `value` prop to set which options are selected and will be displayed when it is read-only.
|
100
|
+
*/
|
101
|
+
export const ReadOnlyExample = {
|
102
|
+
render: () => ReadOnly(),
|
103
|
+
name: "Read-only",
|
104
|
+
};
|
105
|
+
/**
|
106
|
+
* Display options in groups by passing an array of child options to the `children` property of a parent option.
|
107
|
+
* The parent option will be rendered as the title of the group.
|
108
|
+
*/
|
109
|
+
export const GroupsExample = {
|
110
|
+
render: () => Groups(),
|
111
|
+
name: "Groups",
|
112
|
+
};
|
113
|
+
/**
|
114
|
+
* Display certain options at the top of the option list by setting the `recommended` property to `true` on each option.
|
115
|
+
* This will allow for quick access to these options.
|
116
|
+
*/
|
117
|
+
export const RecommendedExample = {
|
118
|
+
render: () => Recommended(),
|
119
|
+
name: "Recommended",
|
120
|
+
};
|
121
|
+
/**
|
122
|
+
* Display a validation status and message by using the `validation-status` and `validation-message` props.
|
123
|
+
* The `validation-status` prop takes the values `success`, `warning` or `error`.
|
124
|
+
*/
|
125
|
+
export const ValidationExample = {
|
126
|
+
render: () => Validation(),
|
127
|
+
name: "Validation",
|
128
|
+
};
|
129
|
+
/**
|
130
|
+
* Display the loading state by using the `loading` prop.
|
131
|
+
* The multi-select will show a loading error after the amount of time specified using the `timeout` prop has elapsed.
|
132
|
+
*/
|
133
|
+
export const LoadingWithErrorExample = {
|
134
|
+
render: () => LoadingWithError(),
|
135
|
+
name: "Loading With Error",
|
136
|
+
};
|
137
|
+
/**
|
138
|
+
* An example of the multi-select working in a form. The value will appear in the console on submit.
|
139
|
+
*/
|
140
|
+
export const InFormExample = {
|
141
|
+
render: () => InForm(),
|
142
|
+
name: "In Form",
|
143
|
+
};
|
144
|
+
//# sourceMappingURL=ic-select-multi.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ic-select-multi.stories.js","sourceRoot":"","sources":["../../../src/components/ic-select-with-multi/ic-select-multi.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,MAAM,EACN,UAAU,EACV,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,sBAAsB;IAEjC,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE;IACvB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;IAC5B,IAAI,EAAE,eAAe;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM,EAAE,GAAG,EAAE,CAAC,eAAe,EAAE;IAC/B,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE;IAChC,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF;;GAEG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MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE;IAC1B,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE;IAChC,IAAI,EAAE,oBAAoB;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport readme from \"./readme.md\";\nimport {\n Default,\n DefaultValue,\n Disabled,\n DisabledOptions,\n Groups,\n HelperText,\n HiddenLabel,\n InForm,\n LoadingWithError,\n ReadOnly,\n Recommended,\n Required,\n Sizes,\n Validation,\n WithClearButton,\n WithDescriptions,\n} from \"./story-data\";\n\nexport default {\n title: \"Web Components/Multi-Select\",\n component: \"ic-select-with-multi\",\n\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the multi-select component to allow users to select one or more values from a list of options.\n * There is one required prop for the multi-select:\n * - label: `string`\n *\n * Click the 'Component API' tab to view all the available props, events and slots for the multi-select.\n *\n * To use the multi-select component, import `@ukic/canary-web-components` into your application.\n *\n * The component tag name for the multi-select is `ic-select-with-multi`.\n * Even though it is a variant of the `ic-select` component (which includes the single and searchable selects), this different tag name is necessary because of the need to keep the multi-select functionality separate while it is experimental (in a canary release).\n * Note that the `multiple` prop still needs to be applied in order to enable the multi-select functionality.\n */\nexport const DefaultExample = {\n render: () => Default(),\n name: \"Default\",\n};\n\n/**\n * Show options as pre-selected by setting the `value` prop to an array containing the values of these options.\n */\nexport const DefaultValueExample = {\n render: () => DefaultValue(),\n name: \"Default Value\",\n};\n\n/**\n * Display a clear button by using the `show-clear-button` prop.\n * This will appear when the user has selected some options and allow them to easily clear their selection.\n */\nexport const WithClearButtonExample = {\n render: () => WithClearButton(),\n name: \"With Clear Button\",\n};\n\n/**\n * Display extra information about the options by providing a description using the `description` property for each option.\n */\nexport const WithDescriptionsExample = {\n render: () => WithDescriptions(),\n name: \"With Descriptions\",\n};\n\n/**\n * Display helper text to provide additional information by using the `helper-text` prop.\n */\nexport const HelperTextExample = {\n render: () => HelperText(),\n name: \"Helper Text\",\n};\n\n/**\n * Set the size of the multi-select by using the `size` prop. This prop takes the values `small`, `default` or `large`.\n * Depending on the chosen size, the prop will apply styling to increase or decrease the amount of spacing within the component.\n * The `default` variant is seen in the first [default](#default) example.\n */\nexport const SizesExample = {\n render: () => Sizes(),\n name: \"Sizes\",\n};\n\n/**\n * Disable the multi-select and prevent user interaction by using the `disabled` prop.\n */\nexport const DisabledExample = {\n render: () => Disabled(),\n name: \"Disabled\",\n};\n\n/**\n * Disable certain options by setting the `disabled` property to `true` for each option.\n */\nexport const DisabledOptionsExample = {\n render: () => DisabledOptions(),\n name: \"Disabled Options\",\n};\n\n/**\n * Hide the visible label for the multi-select by using the `hide-label` prop.\n */\nexport const HiddenLabelExample = {\n render: () => HiddenLabel(),\n name: \"Hidden Label\",\n};\n\n/**\n * Inform the user that the multi-select is a required field by using the `required` prop.\n * This will display an asterisk next to the label and apply the `aria-required` attribute.\n */\nexport const RequiredExample = {\n render: () => Required(),\n name: \"Required\",\n};\n\n/**\n * Make the multi-select read-only by using the `readonly` prop.\n * Use the `value` prop to set which options are selected and will be displayed when it is read-only.\n */\nexport const ReadOnlyExample = {\n render: () => ReadOnly(),\n name: \"Read-only\",\n};\n\n/**\n * Display options in groups by passing an array of child options to the `children` property of a parent option.\n * The parent option will be rendered as the title of the group.\n */\nexport const GroupsExample = {\n render: () => Groups(),\n name: \"Groups\",\n};\n\n/**\n * Display certain options at the top of the option list by setting the `recommended` property to `true` on each option.\n * This will allow for quick access to these options.\n */\nexport const RecommendedExample = {\n render: () => Recommended(),\n name: \"Recommended\",\n};\n\n/**\n * Display a validation status and message by using the `validation-status` and `validation-message` props.\n * The `validation-status` prop takes the values `success`, `warning` or `error`.\n */\nexport const ValidationExample = {\n render: () => Validation(),\n name: \"Validation\",\n};\n\n/**\n * Display the loading state by using the `loading` prop.\n * The multi-select will show a loading error after the amount of time specified using the `timeout` prop has elapsed.\n */\nexport const LoadingWithErrorExample = {\n render: () => LoadingWithError(),\n name: \"Loading With Error\",\n};\n\n/**\n * An example of the multi-select working in a form. The value will appear in the console on submit.\n */\nexport const InFormExample = {\n render: () => InForm(),\n name: \"In Form\",\n};\n"]}
|
@@ -51,9 +51,19 @@
|
|
51
51
|
background-color: var(--ic-action-dark-bg-active) !important;
|
52
52
|
}
|
53
53
|
|
54
|
+
:host(.ic-tree-item-light) .tree-item-content:hover,
|
55
|
+
:host(.ic-tree-item-light) ::slotted([slot="router-item"]:hover) {
|
56
|
+
background-color: var(--ic-action-light-bg-hover) !important;
|
57
|
+
}
|
58
|
+
|
59
|
+
:host(.ic-tree-item-light) .tree-item-content:active,
|
60
|
+
:host(.ic-tree-item-light) ::slotted([slot="router-item"]:active) {
|
61
|
+
background-color: var(--ic-action-light-bg-active) !important;
|
62
|
+
}
|
63
|
+
|
54
64
|
:host(.ic-tree-item-selected) .tree-item-content,
|
55
65
|
:host(.ic-tree-item-selected) ::slotted([slot="router-item"]) {
|
56
|
-
background-color: var(--ic-action-default-bg-hover)
|
66
|
+
background-color: var(--ic-action-default-bg-hover);
|
57
67
|
}
|
58
68
|
|
59
69
|
:host(.ic-tree-item-small) .tree-item-content,
|
@@ -86,7 +96,7 @@
|
|
86
96
|
:host(.ic-tree-item-disabled) .arrow-dropdown,
|
87
97
|
:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),
|
88
98
|
:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]) {
|
89
|
-
color: var(--ic-architectural-200)
|
99
|
+
color: var(--ic-architectural-200);
|
90
100
|
fill: var(--ic-architectural-200);
|
91
101
|
pointer-events: none;
|
92
102
|
}
|
@@ -99,6 +109,15 @@
|
|
99
109
|
fill: var(--ic-architectural-white);
|
100
110
|
}
|
101
111
|
|
112
|
+
:host(.ic-tree-item-light.ic-tree-item-disabled) .tree-item-content,
|
113
|
+
:host(.ic-tree-item-light.ic-tree-item-disabled) .arrow-dropdown,
|
114
|
+
:host(.ic-tree-item-light.ic-tree-item-disabled) ::slotted([slot="icon"]),
|
115
|
+
:host(.ic-tree-item-light.ic-tree-item-disabled)
|
116
|
+
::slotted([slot="router-item"]) {
|
117
|
+
color: var(--ic-architectural-300);
|
118
|
+
fill: var(--ic-architectural-300);
|
119
|
+
}
|
120
|
+
|
102
121
|
:host .arrow-dropdown {
|
103
122
|
color: var(--ic-action-default);
|
104
123
|
margin-right: var(--ic-space-xs);
|
@@ -162,6 +181,6 @@
|
|
162
181
|
|
163
182
|
:host(.ic-tree-item-selected) .tree-item-content,
|
164
183
|
:host(.ic-tree-item-selected) ::slotted([slot="router-item"]) {
|
165
|
-
color: Highlight
|
184
|
+
color: Highlight;
|
166
185
|
}
|
167
186
|
}
|